var l0=Object.defineProperty;var fp=r=>{throw TypeError(r)};var u0=(r,t,s)=>t in r?l0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s;var je=(r,t,s)=>u0(r,typeof t!="symbol"?t+"":t,s),Wu=(r,t,s)=>t.has(r)||fp("Cannot "+s);var T=(r,t,s)=>(Wu(r,t,"read from private field"),s?s.call(r):t.get(r)),pe=(r,t,s)=>t.has(r)?fp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),ee=(r,t,s,o)=>(Wu(r,t,"write to private field"),o?o.call(r,s):t.set(r,s),s),Pe=(r,t,s)=>(Wu(r,t,"access private method"),s);var xa=(r,t,s,o)=>({set _(a){ee(r,t,a,s)},get _(){return T(r,t,o)}});function c0(r,t){for(var s=0;so[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Hc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Vu={exports:{}},Do={},Hu={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hp;function d0(){if(hp)return Ce;hp=1;var r=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function S(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,k={};function x(N,z,ce){this.props=N,this.context=z,this.refs=k,this.updater=ce||O}x.prototype.isReactComponent={},x.prototype.setState=function(N,z){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,z,"setState")},x.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function E(){}E.prototype=x.prototype;function j(N,z,ce){this.props=N,this.context=z,this.refs=k,this.updater=ce||O}var P=j.prototype=new E;P.constructor=j,F(P,x.prototype),P.isPureReactComponent=!0;var L=Array.isArray,W=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(N,z,ce){var me,he={},Y=null,ve=null;if(z!=null)for(me in z.ref!==void 0&&(ve=z.ref),z.key!==void 0&&(Y=""+z.key),z)W.call(z,me)&&!G.hasOwnProperty(me)&&(he[me]=z[me]);var Te=arguments.length-2;if(Te===1)he.children=ce;else if(1>>1,z=K[N];if(0>>1;Na(he,M))Ya(ve,he)?(K[N]=ve,K[Y]=M,N=Y):(K[N]=he,K[me]=M,N=me);else if(Ya(ve,M))K[N]=ve,K[Y]=M,N=Y;else break e}}return ae}function a(K,ae){var M=K.sortIndex-ae.sortIndex;return M!==0?M:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;r.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();r.unstable_now=function(){return d.now()-h}}var p=[],m=[],g=1,v=null,S=3,O=!1,F=!1,k=!1,x=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(m)}}function L(K){if(k=!1,P(K),!F)if(s(p)!==null)F=!0,Ee(W);else{var ae=s(m);ae!==null&&_e(L,ae.startTime-K)}}function W(K,ae){F=!1,k&&(k=!1,E(B),B=-1),O=!0;var M=S;try{for(P(ae),v=s(p);v!==null&&(!(v.expirationTime>ae)||K&&!be());){var N=v.callback;if(typeof N=="function"){v.callback=null,S=v.priorityLevel;var z=N(v.expirationTime<=ae);ae=r.unstable_now(),typeof z=="function"?v.callback=z:v===s(p)&&o(p),P(ae)}else o(p);v=s(p)}if(v!==null)var ce=!0;else{var me=s(m);me!==null&&_e(L,me.startTime-ae),ce=!1}return ce}finally{v=null,S=M,O=!1}}var $=!1,G=null,B=-1,ie=5,ue=-1;function be(){return!(r.unstable_now()-ueK||125N?(K.sortIndex=M,t(m,K),s(p)===null&&K===s(m)&&(k?(E(B),B=-1):k=!0,_e(L,M-N))):(K.sortIndex=z,t(p,K),F||O||(F=!0,Ee(W))),K},r.unstable_shouldYield=be,r.unstable_wrapCallback=function(K){var ae=S;return function(){var M=S;S=ae;try{return K.apply(this,arguments)}finally{S=M}}}})(Ku)),Ku}var vp;function m0(){return vp||(vp=1,Qu.exports=p0()),Qu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var wp;function g0(){if(wp)return Rt;wp=1;var r=qc(),t=m0();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function S(e){return p.call(v,e)?!0:p.call(g,e)?!1:m.test(e)?v[e]=!0:(g[e]=!0,!1)}function O(e,n,i,l){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,n,i,l){if(n===null||typeof n>"u"||O(e,n,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function k(e,n,i,l,c,f,y){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=y}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];x[n]=new k(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new k(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function j(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(E,j);x[n]=new k(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,j);x[n]=new k(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,j);x[n]=new k(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function P(e,n,i,l){var c=x.hasOwnProperty(n)?x[n]:null;(c!==null?c.type!==0:l||!(2b||c[y]!==f[b]){var C=` `+c[y].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=y&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?z(e):""}function he(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case ie:return"Profiler";case B:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case be:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Re:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Se:return n=e.displayName||null,n!==null?n:Y(e.type)||"Memo";case Ee:n=e._payload,e=e._init;try{return Y(e(n))}catch{}}return null}function ve(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(n);case 8:return n===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Te(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tt(e){var n=ye(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ft(e){e._valueTracker||(e._valueTracker=tt(e))}function it(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),l="";return e&&(l=ye(e)?e.checked?"true":"false":e.value),e=l,e!==i?(n.setValue(e),!0):!1}function Gt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ut(e,n){var i=n.checked;return M({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Mt(e,n){var i=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;i=Te(n.value!=null?n.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function we(e,n){n=n.checked,n!=null&&P(e,"checked",n,!1)}function at(e,n){we(e,n);var i=Te(n.value),l=n.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Xt(e,n.type,i):n.hasOwnProperty("defaultValue")&&Xt(e,n.type,Te(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Yt(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Xt(e,n,i){(n!=="number"||Gt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Fn=Array.isArray;function Un(e,n,i,l){if(e=e.options,n){n={};for(var c=0;c"+n.valueOf().toString()+"",n=fi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ys(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fv=["Webkit","ms","Moz","O"];Object.keys(Xs).forEach(function(e){fv.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Xs[n]=Xs[e]})});function Cd(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||Xs.hasOwnProperty(e)&&Xs[e]?(""+n).trim():n+"px"}function Td(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var l=i.indexOf("--")===0,c=Cd(i,n[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,c):e[i]=c}}var hv=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function tl(e,n){if(n){if(hv[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function nl(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rl=null;function sl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,ss=null,os=null;function Rd(e){if(e=xo(e)){if(typeof ol!="function")throw Error(s(280));var n=e.stateNode;n&&(n=Di(n),ol(e.stateNode,e.type,n))}}function Pd(e){ss?os?os.push(e):os=[e]:ss=e}function Nd(){if(ss){var e=ss,n=os;if(os=ss=null,Rd(e),n)for(e=0;e>>=0,e===0?32:31-(_v(e)/kv|0)|0}var yi=64,vi=4194304;function to(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function wi(e,n){var i=e.pendingLanes;if(i===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,y=i&268435455;if(y!==0){var b=y&~c;b!==0?l=to(b):(f&=y,f!==0&&(l=to(f)))}else y=i&~c,y!==0?l=to(y):f!==0&&(l=to(f));if(l===0)return 0;if(n!==0&&n!==l&&(n&c)===0&&(c=l&-l,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((l&4)!==0&&(l|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0i;i++)n.push(e);return n}function no(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Jt(n),e[n]=i}function Pv(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=co),sf=" ",of=!1;function af(e,n){switch(e){case"keyup":return rw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ls=!1;function ow(e,n){switch(e){case"compositionend":return lf(n);case"keypress":return n.which!==32?null:(of=!0,sf);case"textInput":return e=n.data,e===sf&&of?null:e;default:return null}}function iw(e,n){if(ls)return e==="compositionend"||!Sl&&af(e,n)?(e=Jd(),_i=yl=Wn=null,ls=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:i,offset:n-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=mf(i)}}function yf(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?yf(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function vf(){for(var e=window,n=Gt();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Gt(e.document)}return n}function Cl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function mw(e){var n=vf(),i=e.focusedElem,l=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&yf(i.ownerDocument.documentElement,i)){if(l!==null&&Cl(i)){if(n=l.start,e=l.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=gf(i,f);var y=gf(i,l);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(n),e.extend(y.node,y.offset)):(n.setEnd(y.node,y.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,us=null,Tl=null,mo=null,Rl=!1;function wf(e,n,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Rl||us==null||us!==Gt(l)||(l=us,"selectionStart"in l&&Cl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mo&&po(mo,l)||(mo=l,l=Ai(Tl,"onSelect"),0ps||(e.current=zl[ps],zl[ps]=null,ps--)}function Ue(e,n){ps++,zl[ps]=e.current,e.current=n}var Qn={},ht=qn(Qn),St=qn(!1),Sr=Qn;function ms(e,n){var i=e.type.contextTypes;if(!i)return Qn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=n[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function _t(e){return e=e.childContextTypes,e!=null}function Ii(){ze(St),ze(ht)}function jf(e,n,i){if(ht.current!==Qn)throw Error(s(168));Ue(ht,n),Ue(St,i)}function Df(e,n,i){var l=e.stateNode;if(n=n.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var c in l)if(!(c in n))throw Error(s(108,ve(e)||"Unknown",c));return M({},i,l)}function Fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qn,Sr=ht.current,Ue(ht,e),Ue(St,St.current),!0}function If(e,n,i){var l=e.stateNode;if(!l)throw Error(s(169));i?(e=Df(e,n,Sr),l.__reactInternalMemoizedMergedChildContext=e,ze(St),ze(ht),Ue(ht,e)):ze(St),Ue(St,i)}var _n=null,Ui=!1,Bl=!1;function Ff(e){_n===null?_n=[e]:_n.push(e)}function Tw(e){Ui=!0,Ff(e)}function Kn(){if(!Bl&&_n!==null){Bl=!0;var e=0,n=Ie;try{var i=_n;for(Ie=1;e>=y,c-=y,kn=1<<32-Jt(n)+c|i<ge?(st=fe,fe=null):st=fe.sibling;var Le=V(D,fe,I[ge],Q);if(Le===null){fe===null&&(fe=st);break}e&&fe&&Le.alternate===null&&n(D,fe),R=f(Le,R,ge),de===null?le=Le:de.sibling=Le,de=Le,fe=st}if(ge===I.length)return i(D,fe),Be&&kr(D,ge),le;if(fe===null){for(;gege?(st=fe,fe=null):st=fe.sibling;var rr=V(D,fe,Le.value,Q);if(rr===null){fe===null&&(fe=st);break}e&&fe&&rr.alternate===null&&n(D,fe),R=f(rr,R,ge),de===null?le=rr:de.sibling=rr,de=rr,fe=st}if(Le.done)return i(D,fe),Be&&kr(D,ge),le;if(fe===null){for(;!Le.done;ge++,Le=I.next())Le=q(D,Le.value,Q),Le!==null&&(R=f(Le,R,ge),de===null?le=Le:de.sibling=Le,de=Le);return Be&&kr(D,ge),le}for(fe=l(D,fe);!Le.done;ge++,Le=I.next())Le=Z(fe,D,ge,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ge:Le.key),R=f(Le,R,ge),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(a0){return n(D,a0)}),Be&&kr(D,ge),le}function Qe(D,R,I,Q){if(typeof I=="object"&&I!==null&&I.type===G&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case W:e:{for(var le=I.key,de=R;de!==null;){if(de.key===le){if(le=I.type,le===G){if(de.tag===7){i(D,de.sibling),R=c(de,I.props.children),R.return=D,D=R;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ee&&Wf(le)===de.type){i(D,de.sibling),R=c(de,I.props),R.ref=bo(D,de,I),R.return=D,D=R;break e}i(D,de);break}else n(D,de);de=de.sibling}I.type===G?(R=Lr(I.props.children,D.mode,Q,I.key),R.return=D,D=R):(Q=fa(I.type,I.key,I.props,null,D.mode,Q),Q.ref=bo(D,R,I),Q.return=D,D=Q)}return y(D);case $:e:{for(de=I.key;R!==null;){if(R.key===de)if(R.tag===4&&R.stateNode.containerInfo===I.containerInfo&&R.stateNode.implementation===I.implementation){i(D,R.sibling),R=c(R,I.children||[]),R.return=D,D=R;break e}else{i(D,R);break}else n(D,R);R=R.sibling}R=Uu(I,D.mode,Q),R.return=D,D=R}return y(D);case Ee:return de=I._init,Qe(D,R,de(I._payload),Q)}if(Fn(I))return ne(D,R,I,Q);if(ae(I))return oe(D,R,I,Q);$i(D,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,R!==null&&R.tag===6?(i(D,R.sibling),R=c(R,I),R.return=D,D=R):(i(D,R),R=Fu(I,D.mode,Q),R.return=D,D=R),y(D)):i(D,R)}return Qe}var ws=Vf(!0),Hf=Vf(!1),Wi=qn(null),Vi=null,xs=null,Ql=null;function Kl(){Ql=xs=Vi=null}function Gl(e){var n=Wi.current;ze(Wi),e._currentValue=n}function Yl(e,n,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===i)break;e=e.return}}function bs(e,n){Vi=e,Ql=xs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(kt=!0),e.firstContext=null)}function $t(e){var n=e._currentValue;if(Ql!==e)if(e={context:e,memoizedValue:n,next:null},xs===null){if(Vi===null)throw Error(s(308));xs=e,Vi.dependencies={lanes:0,firstContext:e}}else xs=xs.next=e;return n}var Cr=null;function Xl(e){Cr===null?Cr=[e]:Cr.push(e)}function qf(e,n,i,l){var c=n.interleaved;return c===null?(i.next=i,Xl(n)):(i.next=c.next,c.next=i),n.interleaved=i,Tn(e,l)}function Tn(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Gn=!1;function Jl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Yn(e,n,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var c=l.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),l.pending=n,Tn(e,i)}return c=l.interleaved,c===null?(n.next=n,Xl(l)):(n.next=c.next,c.next=n),l.interleaved=n,Tn(e,i)}function Hi(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,fl(e,i)}}function Kf(e,n){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?c=f=n:f=f.next=n}else c=f=n;i={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function qi(e,n,i,l){var c=e.updateQueue;Gn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var C=b,U=C.next;C.next=null,y===null?f=U:y.next=U,y=C;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==y&&(b===null?H.firstBaseUpdate=U:b.next=U,H.lastBaseUpdate=C))}if(f!==null){var q=c.baseState;y=0,H=U=C=null,b=f;do{var V=b.lane,Z=b.eventTime;if((l&V)===V){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ne=e,oe=b;switch(V=n,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){q=ne.call(Z,q,V);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,V=typeof ne=="function"?ne.call(Z,q,V):ne,V==null)break e;q=M({},q,V);break e;case 2:Gn=!0}}b.callback!==null&&b.lane!==0&&(e.flags|=64,V=c.effects,V===null?c.effects=[b]:V.push(b))}else Z={eventTime:Z,lane:V,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(U=H=Z,C=q):H=H.next=Z,y|=V;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;V=b,b=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);if(H===null&&(C=q),c.baseState=C,c.firstBaseUpdate=U,c.lastBaseUpdate=H,n=c.shared.interleaved,n!==null){c=n;do y|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Pr|=y,e.lanes=y,e.memoizedState=q}}function Gf(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;ni?i:4,e(!0);var l=ru.transition;ru.transition={};try{e(!1),n()}finally{Ie=i,ru.transition=l}}function ph(){return Wt().memoizedState}function Ow(e,n,i){var l=er(e);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},mh(e))gh(n,i);else if(i=qf(e,n,i,l),i!==null){var c=bt();sn(i,e,l,c),yh(i,n,l)}}function Aw(e,n,i){var l=er(e),c={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(mh(e))gh(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,b=f(y,i);if(c.hasEagerState=!0,c.eagerState=b,Zt(b,y)){var C=n.interleaved;C===null?(c.next=c,Xl(n)):(c.next=C.next,C.next=c),n.interleaved=c;return}}catch{}finally{}i=qf(e,n,c,l),i!==null&&(c=bt(),sn(i,e,l,c),yh(i,n,l))}}function mh(e){var n=e.alternate;return e===We||n!==null&&n===We}function gh(e,n){ko=Gi=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function yh(e,n,i){if((i&4194240)!==0){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,fl(e,i)}}var Ji={readContext:$t,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},Lw={readContext:$t,useCallback:function(e,n){return pn().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:ih,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,Yi(4194308,4,uh.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Yi(4194308,4,e,n)},useInsertionEffect:function(e,n){return Yi(4,2,e,n)},useMemo:function(e,n){var i=pn();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var l=pn();return n=i!==void 0?i(n):n,l.memoizedState=l.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Ow.bind(null,We,e),[l.memoizedState,e]},useRef:function(e){var n=pn();return e={current:e},n.memoizedState=e},useState:sh,useDebugValue:cu,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=sh(!1),n=e[0];return e=Nw.bind(null,e[1]),pn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var l=We,c=pn();if(Be){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),rt===null)throw Error(s(349));(Rr&30)!==0||Zf(l,n,i)}c.memoizedState=i;var f={value:i,getSnapshot:n};return c.queue=f,ih(th.bind(null,l,f,e),[e]),l.flags|=2048,Ro(9,eh.bind(null,l,f,i,n),void 0,null),i},useId:function(){var e=pn(),n=rt.identifierPrefix;if(Be){var i=Cn,l=kn;i=(l&~(1<<32-Jt(l)-1)).toString(32)+i,n=":"+n+"R"+i,i=Co++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(i,{is:l.is}):(e=y.createElement(i),i==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,i),e[fn]=n,e[wo]=l,Fh(e,n,!1,!1),n.stateNode=e;e:{switch(y=nl(i,l),i){case"dialog":Me("cancel",e),Me("close",e),c=l;break;case"iframe":case"object":case"embed":Me("load",e),c=l;break;case"video":case"audio":for(c=0;cCs&&(n.flags|=128,l=!0,Po(f,!1),n.lanes=4194304)}else{if(!l)if(e=Qi(y),e!==null){if(n.flags|=128,l=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),Po(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!Be)return mt(n),null}else 2*qe()-f.renderingStartTime>Cs&&i!==1073741824&&(n.flags|=128,l=!0,Po(f,!1),n.lanes=4194304);f.isBackwards?(y.sibling=n.child,n.child=y):(i=f.last,i!==null?i.sibling=y:n.child=y,f.last=y)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=qe(),n.sibling=null,i=$e.current,Ue($e,l?i&1|2:i&1),n):(mt(n),null);case 22:case 23:return ju(),l=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(n.flags|=8192),l&&(n.mode&1)!==0?(Dt&1073741824)!==0&&(mt(n),n.subtreeFlags&6&&(n.flags|=8192)):mt(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function Bw(e,n){switch(Wl(n),n.tag){case 1:return _t(n.type)&&Ii(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Es(),ze(St),ze(ht),nu(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return eu(n),null;case 13:if(ze($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));vs()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return ze($e),null;case 4:return Es(),null;case 10:return Gl(n.type._context),null;case 22:case 23:return ju(),null;case 24:return null;default:return null}}var na=!1,gt=!1,$w=typeof WeakSet=="function"?WeakSet:Set,te=null;function _s(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){Ve(e,n,l)}else i.current=null}function Eu(e,n,i){try{i()}catch(l){Ve(e,n,l)}}var zh=!1;function Ww(e,n){if(jl=Ei,e=vf(),Cl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,b=-1,C=-1,U=0,H=0,q=e,V=null;t:for(;;){for(var Z;q!==i||c!==0&&q.nodeType!==3||(b=y+c),q!==f||l!==0&&q.nodeType!==3||(C=y+l),q.nodeType===3&&(y+=q.nodeValue.length),(Z=q.firstChild)!==null;)V=q,q=Z;for(;;){if(q===e)break t;if(V===i&&++U===c&&(b=y),V===f&&++H===l&&(C=y),(Z=q.nextSibling)!==null)break;q=V,V=q.parentNode}q=Z}i=b===-1||C===-1?null:{start:b,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Dl={focusedElem:e,selectionRange:i},Ei=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var ne=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Qe=ne.memoizedState,D=n.stateNode,R=D.getSnapshotBeforeUpdate(n.elementType===n.type?oe:tn(n.type,oe),Qe);D.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var I=n.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){Ve(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return ne=zh,zh=!1,ne}function No(e,n,i){var l=n.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Eu(n,i,f)}c=c.next}while(c!==l)}}function ra(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var l=i.create;i.destroy=l()}i=i.next}while(i!==n)}}function Su(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function Bh(e){var n=e.alternate;n!==null&&(e.alternate=null,Bh(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[fn],delete n[wo],delete n[Ml],delete n[kw],delete n[Cw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $h(e){return e.tag===5||e.tag===3||e.tag===4}function Wh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$h(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _u(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=ji));else if(l!==4&&(e=e.child,e!==null))for(_u(e,n,i),e=e.sibling;e!==null;)_u(e,n,i),e=e.sibling}function ku(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(ku(e,n,i),e=e.sibling;e!==null;)ku(e,n,i),e=e.sibling}var lt=null,nn=!1;function Xn(e,n,i){for(i=i.child;i!==null;)Vh(e,n,i),i=i.sibling}function Vh(e,n,i){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(gi,i)}catch{}switch(i.tag){case 5:gt||_s(i,n);case 6:var l=lt,c=nn;lt=null,Xn(e,n,i),lt=l,nn=c,lt!==null&&(nn?(e=lt,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):lt.removeChild(i.stateNode));break;case 18:lt!==null&&(nn?(e=lt,i=i.stateNode,e.nodeType===8?Ul(e.parentNode,i):e.nodeType===1&&Ul(e,i),ao(e)):Ul(lt,i.stateNode));break;case 4:l=lt,c=nn,lt=i.stateNode.containerInfo,nn=!0,Xn(e,n,i),lt=l,nn=c;break;case 0:case 11:case 14:case 15:if(!gt&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&Eu(i,n,y),c=c.next}while(c!==l)}Xn(e,n,i);break;case 1:if(!gt&&(_s(i,n),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(b){Ve(i,n,b)}Xn(e,n,i);break;case 21:Xn(e,n,i);break;case 22:i.mode&1?(gt=(l=gt)||i.memoizedState!==null,Xn(e,n,i),gt=l):Xn(e,n,i);break;default:Xn(e,n,i)}}function Hh(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new $w),n.forEach(function(l){var c=Jw.bind(null,e,l);i.has(l)||(i.add(l),l.then(c,c))})}}function rn(e,n){var i=n.deletions;if(i!==null)for(var l=0;lc&&(c=y),l&=~f}if(l=c,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Hw(l/1960))-l,10e?16:e,Zn===null)var l=!1;else{if(e=Zn,Zn=null,la=0,(Ae&6)!==0)throw Error(s(331));var c=Ae;for(Ae|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var b=f.deletions;if(b!==null){for(var C=0;Cqe()-Ru?Or(e,0):Tu|=i),Tt(e,n)}function sp(e,n){n===0&&((e.mode&1)===0?n=1:(n=vi,vi<<=1,(vi&130023424)===0&&(vi=4194304)));var i=bt();e=Tn(e,n),e!==null&&(no(e,n,i),Tt(e,i))}function Xw(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),sp(e,i)}function Jw(e,n){var i=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(n),sp(e,i)}var op;op=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||St.current)kt=!0;else{if((e.lanes&i)===0&&(n.flags&128)===0)return kt=!1,Mw(e,n,i);kt=(e.flags&131072)!==0}else kt=!1,Be&&(n.flags&1048576)!==0&&Uf(n,zi,n.index);switch(n.lanes=0,n.tag){case 2:var l=n.type;ta(e,n),e=n.pendingProps;var c=ms(n,ht.current);bs(n,i),c=ou(null,n,l,e,c,i);var f=iu();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,_t(l)?(f=!0,Fi(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Jl(n),c.updater=Zi,n.stateNode=c,c._reactInternals=n,fu(n,l,e,i),n=gu(null,n,l,!0,f,i)):(n.tag=0,Be&&f&&$l(n),xt(null,n,c,i),n=n.child),n;case 16:l=n.elementType;e:{switch(ta(e,n),e=n.pendingProps,c=l._init,l=c(l._payload),n.type=l,c=n.tag=e0(l),e=tn(l,e),c){case 0:n=mu(null,n,l,e,i);break e;case 1:n=Oh(null,n,l,e,i);break e;case 11:n=Ch(null,n,l,e,i);break e;case 14:n=Th(null,n,l,tn(l.type,e),i);break e}throw Error(s(306,l,""))}return n;case 0:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),mu(e,n,l,c,i);case 1:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),Oh(e,n,l,c,i);case 3:e:{if(Ah(n),e===null)throw Error(s(387));l=n.pendingProps,f=n.memoizedState,c=f.element,Qf(e,n),qi(n,l,null,i);var y=n.memoizedState;if(l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Ss(Error(s(423)),n),n=Lh(e,n,l,i,c);break e}else if(l!==c){c=Ss(Error(s(424)),n),n=Lh(e,n,l,i,c);break e}else for(jt=Hn(n.stateNode.containerInfo.firstChild),Lt=n,Be=!0,en=null,i=Hf(n,null,l,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(vs(),l===c){n=Pn(e,n,i);break e}xt(e,n,l,i)}n=n.child}return n;case 5:return Yf(n),e===null&&Hl(n),l=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Il(l,c)?y=null:f!==null&&Il(l,f)&&(n.flags|=32),Nh(e,n),xt(e,n,y,i),n.child;case 6:return e===null&&Hl(n),null;case 13:return jh(e,n,i);case 4:return Zl(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=ws(n,null,l,i):xt(e,n,l,i),n.child;case 11:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),Ch(e,n,l,c,i);case 7:return xt(e,n,n.pendingProps,i),n.child;case 8:return xt(e,n,n.pendingProps.children,i),n.child;case 12:return xt(e,n,n.pendingProps.children,i),n.child;case 10:e:{if(l=n.type._context,c=n.pendingProps,f=n.memoizedProps,y=c.value,Ue(Wi,l._currentValue),l._currentValue=y,f!==null)if(Zt(f.value,y)){if(f.children===c.children&&!St.current){n=Pn(e,n,i);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var b=f.dependencies;if(b!==null){y=f.child;for(var C=b.firstContext;C!==null;){if(C.context===l){if(f.tag===1){C=Rn(-1,i&-i),C.tag=2;var U=f.updateQueue;if(U!==null){U=U.shared;var H=U.pending;H===null?C.next=C:(C.next=H.next,H.next=C),U.pending=C}}f.lanes|=i,C=f.alternate,C!==null&&(C.lanes|=i),Yl(f.return,i,n),b.lanes|=i;break}C=C.next}}else if(f.tag===10)y=f.type===n.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=i,b=y.alternate,b!==null&&(b.lanes|=i),Yl(y,i,n),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}xt(e,n,c.children,i),n=n.child}return n;case 9:return c=n.type,l=n.pendingProps.children,bs(n,i),c=$t(c),l=l(c),n.flags|=1,xt(e,n,l,i),n.child;case 14:return l=n.type,c=tn(l,n.pendingProps),c=tn(l.type,c),Th(e,n,l,c,i);case 15:return Rh(e,n,n.type,n.pendingProps,i);case 17:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),ta(e,n),n.tag=1,_t(l)?(e=!0,Fi(n)):e=!1,bs(n,i),wh(n,l,c),fu(n,l,c,i),gu(null,n,l,!0,e,i);case 19:return Ih(e,n,i);case 22:return Ph(e,n,i)}throw Error(s(156,n.tag))};function ip(e,n){return Ud(e,n)}function Zw(e,n,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,n,i,l){return new Zw(e,n,i,l)}function Iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function e0(e){if(typeof e=="function")return Iu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Re)return 11;if(e===Se)return 14}return 2}function nr(e,n){var i=e.alternate;return i===null?(i=Ht(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function fa(e,n,i,l,c,f){var y=2;if(l=e,typeof e=="function")Iu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Lr(i.children,c,f,n);case B:y=8,c|=8;break;case ie:return e=Ht(12,i,n,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=Ht(13,i,n,c),e.elementType=xe,e.lanes=f,e;case J:return e=Ht(19,i,n,c),e.elementType=J,e.lanes=f,e;case _e:return ha(i,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:y=10;break e;case be:y=9;break e;case Re:y=11;break e;case Se:y=14;break e;case Ee:y=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Ht(y,i,n,c),n.elementType=e,n.type=l,n.lanes=f,n}function Lr(e,n,i,l){return e=Ht(7,e,l,n),e.lanes=i,e}function ha(e,n,i,l){return e=Ht(22,e,l,n),e.elementType=_e,e.lanes=i,e.stateNode={isHidden:!1},e}function Fu(e,n,i){return e=Ht(6,e,null,n),e.lanes=i,e}function Uu(e,n,i){return n=Ht(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function t0(e,n,i,l,c){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dl(0),this.expirationTimes=dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dl(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Mu(e,n,i,l,c,f,y,b,C){return e=new t0(e,n,i,b,C),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Ht(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jl(f),e}function n0(e,n,i){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),qu.exports=g0(),qu.exports}var bp;function y0(){if(bp)return ba;bp=1;var r=eg();return ba.createRoot=r.createRoot,ba.hydrateRoot=r.hydrateRoot,ba}var v0=y0();const w0=Hc(v0),x0=20,b0=1e6,Dn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Gu=0;function E0(){return Gu=(Gu+1)%Number.MAX_VALUE,Gu.toString()}const Yu=new Map,Ep=r=>{if(Yu.has(r))return;const t=setTimeout(()=>{Yu.delete(r),Ho({type:Dn.REMOVE_TOAST,toastId:r})},b0);Yu.set(r,t)},S0=(r,t)=>{switch(t.type){case Dn.ADD_TOAST:return{...r,toasts:[t.toast,...r.toasts].slice(0,x0)};case Dn.UPDATE_TOAST:return{...r,toasts:r.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Dn.DISMISS_TOAST:{const{toastId:s}=t;return s?Ep(s):r.toasts.forEach(o=>{Ep(o.id)}),{...r,toasts:r.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case Dn.REMOVE_TOAST:return t.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(s=>s.id!==t.toastId)}}},La=[];let ja={toasts:[]};function Ho(r){ja=S0(ja,r),La.forEach(t=>{t(ja)})}function _0({...r}){const t=E0(),s=a=>Ho({type:Dn.UPDATE_TOAST,toast:{...a,id:t}}),o=()=>Ho({type:Dn.DISMISS_TOAST,toastId:t});return Ho({type:Dn.ADD_TOAST,toast:{...r,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function k0(){const[r,t]=_.useState(ja);return _.useEffect(()=>(La.push(t),()=>{const s=La.indexOf(t);s>-1&&La.splice(s,1)}),[r]),{...r,toast:_0,dismiss:s=>Ho({type:Dn.DISMISS_TOAST,toastId:s})}}var Qc=eg();const C0=Hc(Qc);function It(r,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(r==null||r(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Sp(r,t){if(typeof r=="function")return r(t);r!=null&&(r.current=t)}function Kc(...r){return t=>{let s=!1;const o=r.map(a=>{const u=Sp(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var E;const{scope:S,children:O,...F}=v,k=((E=S==null?void 0:S[r])==null?void 0:E[p])||h,x=_.useMemo(()=>F,Object.values(F));return w.jsx(k.Provider,{value:x,children:O})};m.displayName=u+"Provider";function g(v,S){var k;const O=((k=S==null?void 0:S[r])==null?void 0:k[p])||h,F=_.useContext(O);if(F)return F;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[m,g]}const a=()=>{const u=s.map(d=>_.createContext(d));return function(h){const p=(h==null?void 0:h[r])||u;return _.useMemo(()=>({[`__scope${r}`]:{...h,[r]:p}}),[h,p])}};return a.scopeName=r,[o,T0(a,...t)]}function T0(...r){const t=r[0];if(r.length===1)return t;const s=()=>{const o=r.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=o.reduce((h,{useScope:p,scopeName:m})=>{const v=p(u)[`__scope${m}`];return{...h,...v}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function _p(r){const t=R0(r),s=_.forwardRef((o,a)=>{const{children:u,...d}=o,h=_.Children.toArray(u),p=h.find(N0);if(p){const m=p.props.children,g=h.map(v=>v===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:v);return w.jsx(t,{...d,ref:a,children:_.isValidElement(m)?_.cloneElement(m,void 0,g):null})}return w.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${r}.Slot`,s}function R0(r){const t=_.forwardRef((s,o)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=A0(a),h=O0(u,a.props);return a.type!==_.Fragment&&(h.ref=o?Kc(o,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var P0=Symbol("radix.slottable");function N0(r){return _.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===P0}function O0(r,t){const s={...t};for(const o in t){const a=r[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...r,...s}}function A0(r){var o,a;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}function L0(r){const t=r+"CollectionProvider",[s,o]=tg(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:x,children:E}=k,j=ir.useRef(null),P=ir.useRef(new Map).current;return w.jsx(a,{scope:x,itemMap:P,collectionRef:j,children:E})};d.displayName=t;const h=r+"CollectionSlot",p=_p(h),m=ir.forwardRef((k,x)=>{const{scope:E,children:j}=k,P=u(h,E),L=Yr(x,P.collectionRef);return w.jsx(p,{ref:L,children:j})});m.displayName=h;const g=r+"CollectionItemSlot",v="data-radix-collection-item",S=_p(g),O=ir.forwardRef((k,x)=>{const{scope:E,children:j,...P}=k,L=ir.useRef(null),W=Yr(x,L),$=u(g,E);return ir.useEffect(()=>($.itemMap.set(L,{ref:L,...P}),()=>void $.itemMap.delete(L))),w.jsx(S,{[v]:"",ref:W,children:j})});O.displayName=g;function F(k){const x=u(r+"CollectionConsumer",k);return ir.useCallback(()=>{const j=x.collectionRef.current;if(!j)return[];const P=Array.from(j.querySelectorAll(`[${v}]`));return Array.from(x.itemMap.values()).sort(($,G)=>P.indexOf($.ref.current)-P.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:m,ItemSlot:O},F,o]}function j0(r){const t=D0(r),s=_.forwardRef((o,a)=>{const{children:u,...d}=o,h=_.Children.toArray(u),p=h.find(F0);if(p){const m=p.props.children,g=h.map(v=>v===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:v);return w.jsx(t,{...d,ref:a,children:_.isValidElement(m)?_.cloneElement(m,void 0,g):null})}return w.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${r}.Slot`,s}function D0(r){const t=_.forwardRef((s,o)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=M0(a),h=U0(u,a.props);return a.type!==_.Fragment&&(h.ref=o?Kc(o,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var I0=Symbol("radix.slottable");function F0(r){return _.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===I0}function U0(r,t){const s={...t};for(const o in t){const a=r[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...r,...s}}function M0(r){var o,a;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var z0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bn=z0.reduce((r,t)=>{const s=j0(`Primitive.${t}`),o=_.forwardRef((a,u)=>{const{asChild:d,...h}=a,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${t}`,{...r,[t]:o}},{});function ng(r,t){r&&Qc.flushSync(()=>r.dispatchEvent(t))}function Xr(r){const t=_.useRef(r);return _.useEffect(()=>{t.current=r}),_.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function B0(r,t=globalThis==null?void 0:globalThis.document){const s=Xr(r);_.useEffect(()=>{const o=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var $0="DismissableLayer",dc="dismissableLayer.update",W0="dismissableLayer.pointerDownOutside",V0="dismissableLayer.focusOutside",kp,rg=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sg=_.forwardRef((r,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=r,m=_.useContext(rg),[g,v]=_.useState(null),S=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,O]=_.useState({}),F=Yr(t,G=>v(G)),k=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(x),j=g?k.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,L=j>=E,W=q0(G=>{const B=G.target,ie=[...m.branches].some(ue=>ue.contains(B));!L||ie||(a==null||a(G),d==null||d(G),G.defaultPrevented||h==null||h())},S),$=Q0(G=>{const B=G.target;[...m.branches].some(ue=>ue.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},S);return B0(G=>{j===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},S),_.useEffect(()=>{if(g)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(kp=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Cp(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=kp)}},[g,S,s,m]),_.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Cp())},[g,m]),_.useEffect(()=>{const G=()=>O({});return document.addEventListener(dc,G),()=>document.removeEventListener(dc,G)},[]),w.jsx(bn.div,{...p,ref:F,style:{pointerEvents:P?L?"auto":"none":void 0,...r.style},onFocusCapture:It(r.onFocusCapture,$.onFocusCapture),onBlurCapture:It(r.onBlurCapture,$.onBlurCapture),onPointerDownCapture:It(r.onPointerDownCapture,W.onPointerDownCapture)})});sg.displayName=$0;var H0="DismissableLayerBranch",og=_.forwardRef((r,t)=>{const s=_.useContext(rg),o=_.useRef(null),a=Yr(t,o);return _.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),w.jsx(bn.div,{...r,ref:a})});og.displayName=H0;function q0(r,t=globalThis==null?void 0:globalThis.document){const s=Xr(r),o=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){ig(W0,s,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function Q0(r,t=globalThis==null?void 0:globalThis.document){const s=Xr(r),o=_.useRef(!1);return _.useEffect(()=>{const a=u=>{u.target&&!o.current&&ig(V0,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Cp(){const r=new CustomEvent(dc);document.dispatchEvent(r)}function ig(r,t,s,{discrete:o}){const a=s.originalEvent.target,u=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(r,t,{once:!0}),o?ng(a,u):a.dispatchEvent(u)}var K0=sg,G0=og,Qo=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},Y0="Portal",ag=_.forwardRef((r,t)=>{var h;const{container:s,...o}=r,[a,u]=_.useState(!1);Qo(()=>u(!0),[]);const d=s||a&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?C0.createPortal(w.jsx(bn.div,{...o,ref:t}),d):null});ag.displayName=Y0;function X0(r,t){return _.useReducer((s,o)=>t[s][o]??s,r)}var lg=r=>{const{present:t,children:s}=r,o=J0(t),a=typeof s=="function"?s({present:o.isPresent}):_.Children.only(s),u=Yr(o.ref,Z0(a));return typeof s=="function"||o.isPresent?_.cloneElement(a,{ref:u}):null};lg.displayName="Presence";function J0(r){const[t,s]=_.useState(),o=_.useRef(null),a=_.useRef(r),u=_.useRef("none"),d=r?"mounted":"unmounted",[h,p]=X0(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const m=Ea(o.current);u.current=h==="mounted"?m:"none"},[h]),Qo(()=>{const m=o.current,g=a.current;if(g!==r){const S=u.current,O=Ea(m);r?p("MOUNT"):O==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(g&&S!==O?"ANIMATION_OUT":"UNMOUNT"),a.current=r}},[r,p]),Qo(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,v=O=>{const k=Ea(o.current).includes(CSS.escape(O.animationName));if(O.target===t&&k&&(p("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},S=O=>{O.target===t&&(u.current=Ea(o.current))};return t.addEventListener("animationstart",S),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",S),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:_.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function Ea(r){return(r==null?void 0:r.animationName)||"none"}function Z0(r){var o,a;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var ex=Zm[" useInsertionEffect ".trim().toString()]||Qo;function tx({prop:r,defaultProp:t,onChange:s=()=>{},caller:o}){const[a,u,d]=nx({defaultProp:t,onChange:s}),h=r!==void 0,p=h?r:a;{const g=_.useRef(r!==void 0);_.useEffect(()=>{const v=g.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=h},[h,o])}const m=_.useCallback(g=>{var v;if(h){const S=rx(g)?g(r):g;S!==r&&((v=d.current)==null||v.call(d,S))}else u(g)},[h,r,u,d]);return[p,m]}function nx({defaultProp:r,onChange:t}){const[s,o]=_.useState(r),a=_.useRef(s),u=_.useRef(t);return ex(()=>{u.current=t},[t]),_.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,o,u]}function rx(r){return typeof r=="function"}var sx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ox="VisuallyHidden",Gc=_.forwardRef((r,t)=>w.jsx(bn.span,{...r,ref:t,style:{...sx,...r.style}}));Gc.displayName=ox;var Yc="ToastProvider",[Xc,ix,ax]=L0("Toast"),[ug]=tg("Toast",[ax]),[lx,Ka]=ug(Yc),cg=r=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=r,[h,p]=_.useState(null),[m,g]=_.useState(0),v=_.useRef(!1),S=_.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Yc}\`. Expected non-empty \`string\`.`),w.jsx(Xc.Provider,{scope:t,children:w.jsx(lx,{scope:t,label:s,duration:o,swipeDirection:a,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:_.useCallback(()=>g(O=>O+1),[]),onToastRemove:_.useCallback(()=>g(O=>O-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:S,children:d})})};cg.displayName=Yc;var dg="ToastViewport",ux=["F8"],fc="toast.viewportPause",hc="toast.viewportResume",fg=_.forwardRef((r,t)=>{const{__scopeToast:s,hotkey:o=ux,label:a="Notifications ({hotkey})",...u}=r,d=Ka(dg,s),h=ix(s),p=_.useRef(null),m=_.useRef(null),g=_.useRef(null),v=_.useRef(null),S=Yr(t,v,d.onViewportChange),O=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=d.toastCount>0;_.useEffect(()=>{const x=E=>{var P;o.length!==0&&o.every(L=>E[L]||E.code===L)&&((P=v.current)==null||P.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),_.useEffect(()=>{const x=p.current,E=v.current;if(F&&x&&E){const j=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(fc);E.dispatchEvent($),d.isClosePausedRef.current=!0}},P=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(hc);E.dispatchEvent($),d.isClosePausedRef.current=!1}},L=$=>{!x.contains($.relatedTarget)&&P()},W=()=>{x.contains(document.activeElement)||P()};return x.addEventListener("focusin",j),x.addEventListener("focusout",L),x.addEventListener("pointermove",j),x.addEventListener("pointerleave",W),window.addEventListener("blur",j),window.addEventListener("focus",P),()=>{x.removeEventListener("focusin",j),x.removeEventListener("focusout",L),x.removeEventListener("pointermove",j),x.removeEventListener("pointerleave",W),window.removeEventListener("blur",j),window.removeEventListener("focus",P)}}},[F,d.isClosePausedRef]);const k=_.useCallback(({tabbingDirection:x})=>{const j=h().map(P=>{const L=P.ref.current,W=[L,...Ex(L)];return x==="forwards"?W:W.reverse()});return(x==="forwards"?j.reverse():j).flat()},[h]);return _.useEffect(()=>{const x=v.current;if(x){const E=j=>{var W,$,G;const P=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!P){const B=document.activeElement,ie=j.shiftKey;if(j.target===x&&ie){(W=m.current)==null||W.focus();return}const Re=k({tabbingDirection:ie?"backwards":"forwards"}),xe=Re.findIndex(J=>J===B);Xu(Re.slice(xe+1))?j.preventDefault():ie?($=m.current)==null||$.focus():(G=g.current)==null||G.focus()}};return x.addEventListener("keydown",E),()=>x.removeEventListener("keydown",E)}},[h,k]),w.jsxs(G0,{ref:p,role:"region","aria-label":a.replace("{hotkey}",O),tabIndex:-1,style:{pointerEvents:F?void 0:"none"},children:[F&&w.jsx(pc,{ref:m,onFocusFromOutsideViewport:()=>{const x=k({tabbingDirection:"forwards"});Xu(x)}}),w.jsx(Xc.Slot,{scope:s,children:w.jsx(bn.ol,{tabIndex:-1,...u,ref:S})}),F&&w.jsx(pc,{ref:g,onFocusFromOutsideViewport:()=>{const x=k({tabbingDirection:"backwards"});Xu(x)}})]})});fg.displayName=dg;var hg="ToastFocusProxy",pc=_.forwardRef((r,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...a}=r,u=Ka(hg,s);return w.jsx(Gc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const h=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(h))&&o()}})});pc.displayName=hg;var si="Toast",cx="toast.swipeStart",dx="toast.swipeMove",fx="toast.swipeCancel",hx="toast.swipeEnd",pg=_.forwardRef((r,t)=>{const{forceMount:s,open:o,defaultOpen:a,onOpenChange:u,...d}=r,[h,p]=tx({prop:o,defaultProp:a??!0,onChange:u,caller:si});return w.jsx(lg,{present:s||h,children:w.jsx(gx,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:Xr(r.onPause),onResume:Xr(r.onResume),onSwipeStart:It(r.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(r.onSwipeMove,m=>{const{x:g,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:It(r.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(r.onSwipeEnd,m=>{const{x:g,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),p(!1)})})})});pg.displayName=si;var[px,mx]=ug(si,{onClose(){}}),gx=_.forwardRef((r,t)=>{const{__scopeToast:s,type:o="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:g,onSwipeMove:v,onSwipeCancel:S,onSwipeEnd:O,...F}=r,k=Ka(si,s),[x,E]=_.useState(null),j=Yr(t,J=>E(J)),P=_.useRef(null),L=_.useRef(null),W=a||k.duration,$=_.useRef(0),G=_.useRef(W),B=_.useRef(0),{onToastAdd:ie,onToastRemove:ue}=k,be=Xr(()=>{var Se;(x==null?void 0:x.contains(document.activeElement))&&((Se=k.viewport)==null||Se.focus()),d()}),Re=_.useCallback(J=>{!J||J===1/0||(window.clearTimeout(B.current),$.current=new Date().getTime(),B.current=window.setTimeout(be,J))},[be]);_.useEffect(()=>{const J=k.viewport;if(J){const Se=()=>{Re(G.current),m==null||m()},Ee=()=>{const _e=new Date().getTime()-$.current;G.current=G.current-_e,window.clearTimeout(B.current),p==null||p()};return J.addEventListener(fc,Ee),J.addEventListener(hc,Se),()=>{J.removeEventListener(fc,Ee),J.removeEventListener(hc,Se)}}},[k.viewport,W,p,m,Re]),_.useEffect(()=>{u&&!k.isClosePausedRef.current&&Re(W)},[u,W,k.isClosePausedRef,Re]),_.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=_.useMemo(()=>x?bg(x):null,[x]);return k.viewport?w.jsxs(w.Fragment,{children:[xe&&w.jsx(yx,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),w.jsx(px,{scope:s,onClose:be,children:Qc.createPortal(w.jsx(Xc.ItemSlot,{scope:s,children:w.jsx(K0,{asChild:!0,onEscapeKeyDown:It(h,()=>{k.isFocusedToastEscapeKeyDownRef.current||be(),k.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(bn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":k.swipeDirection,...F,ref:j,style:{userSelect:"none",touchAction:"none",...r.style},onKeyDown:It(r.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(k.isFocusedToastEscapeKeyDownRef.current=!0,be()))}),onPointerDown:It(r.onPointerDown,J=>{J.button===0&&(P.current={x:J.clientX,y:J.clientY})}),onPointerMove:It(r.onPointerMove,J=>{if(!P.current)return;const Se=J.clientX-P.current.x,Ee=J.clientY-P.current.y,_e=!!L.current,K=["left","right"].includes(k.swipeDirection),ae=["left","up"].includes(k.swipeDirection)?Math.min:Math.max,M=K?ae(0,Se):0,N=K?0:ae(0,Ee),z=J.pointerType==="touch"?10:2,ce={x:M,y:N},me={originalEvent:J,delta:ce};_e?(L.current=ce,Sa(dx,v,me,{discrete:!1})):Tp(ce,k.swipeDirection,z)?(L.current=ce,Sa(cx,g,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(Se)>z||Math.abs(Ee)>z)&&(P.current=null)}),onPointerUp:It(r.onPointerUp,J=>{const Se=L.current,Ee=J.target;if(Ee.hasPointerCapture(J.pointerId)&&Ee.releasePointerCapture(J.pointerId),L.current=null,P.current=null,Se){const _e=J.currentTarget,K={originalEvent:J,delta:Se};Tp(Se,k.swipeDirection,k.swipeThreshold)?Sa(hx,O,K,{discrete:!0}):Sa(fx,S,K,{discrete:!0}),_e.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),k.viewport)})]}):null}),yx=r=>{const{__scopeToast:t,children:s,...o}=r,a=Ka(si,t),[u,d]=_.useState(!1),[h,p]=_.useState(!1);return xx(()=>d(!0)),_.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:w.jsx(ag,{asChild:!0,children:w.jsx(Gc,{...o,children:u&&w.jsxs(w.Fragment,{children:[a.label," ",s]})})})},vx="ToastTitle",mg=_.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return w.jsx(bn.div,{...o,ref:t})});mg.displayName=vx;var wx="ToastDescription",gg=_.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return w.jsx(bn.div,{...o,ref:t})});gg.displayName=wx;var yg="ToastAction",vg=_.forwardRef((r,t)=>{const{altText:s,...o}=r;return s.trim()?w.jsx(xg,{altText:s,asChild:!0,children:w.jsx(Jc,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${yg}\`. Expected non-empty \`string\`.`),null)});vg.displayName=yg;var wg="ToastClose",Jc=_.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r,a=mx(wg,s);return w.jsx(xg,{asChild:!0,children:w.jsx(bn.button,{type:"button",...o,ref:t,onClick:It(r.onClick,a.onClose)})})});Jc.displayName=wg;var xg=_.forwardRef((r,t)=>{const{__scopeToast:s,altText:o,...a}=r;return w.jsx(bn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:t})});function bg(r){const t=[];return Array.from(r.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),bx(o)){const a=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...bg(o))}}),t}function Sa(r,t,s,{discrete:o}){const a=s.originalEvent.currentTarget,u=new CustomEvent(r,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(r,t,{once:!0}),o?ng(a,u):a.dispatchEvent(u)}var Tp=(r,t,s=0)=>{const o=Math.abs(r.x),a=Math.abs(r.y),u=o>a;return t==="left"||t==="right"?u&&o>s:!u&&a>s};function xx(r=()=>{}){const t=Xr(r);Qo(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function bx(r){return r.nodeType===r.ELEMENT_NODE}function Ex(r){const t=[],s=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Xu(r){const t=document.activeElement;return r.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Sx=cg,Eg=fg,Sg=pg,_g=mg,kg=gg,Cg=vg,Tg=Jc;function Rg(r){var t,s,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;ttypeof r=="boolean"?`${r}`:r===0?"0":r,Pp=Pg,_x=(r,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return Pp(r,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(m=>{const g=s==null?void 0:s[m],v=u==null?void 0:u[m];if(g===null)return null;const S=Rp(g)||Rp(v);return a[m][S]}),h=s&&Object.entries(s).reduce((m,g)=>{let[v,S]=g;return S===void 0||(m[v]=S),m},{}),p=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:v,className:S,...O}=g;return Object.entries(O).every(F=>{let[k,x]=F;return Array.isArray(x)?x.includes({...u,...h}[k]):{...u,...h}[k]===x})?[...m,v,S]:m},[]);return Pp(r,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kx=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ng=(...r)=>r.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Cx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tx=_.forwardRef(({color:r="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:u,iconNode:d,...h},p)=>_.createElement("svg",{ref:p,...Cx,width:t,height:t,stroke:r,strokeWidth:o?Number(s)*24/Number(t):s,className:Ng("lucide",a),...h},[...d.map(([m,g])=>_.createElement(m,g)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const In=(r,t)=>{const s=_.forwardRef(({className:o,...a},u)=>_.createElement(Tx,{ref:u,iconNode:t,className:Ng(`lucide-${kx(r)}`,o),...a}));return s.displayName=`${r}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_a=In("ArrowRight",Rx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Px=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Og=In("ChevronDown",Px);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Np=In("ChevronRight",Nx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ox=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Ax=In("Download",Ox);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],jx=In("Globe",Lx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dx=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Ix=In("Menu",Dx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fx=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],Ux=In("Printer",Fx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mx=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],zx=In("Search",Mx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ag=In("X",Bx),$x=(r,t)=>{const s=new Array(r.length+t.length);for(let o=0;o({classGroupId:r,validator:t}),Lg=(r=new Map,t=null,s)=>({nextPart:r,validators:t,classGroupId:s}),$a="-",Op=[],Vx="arbitrary..",Hx=r=>{const t=Qx(r),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=r;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return qx(d);const h=d.split($a),p=h[0]===""&&h.length>1?1:0;return jg(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=o[d],m=s[d];return p?m?$x(m,p):p:m||Op}return s[d]||Op}}},jg=(r,t,s)=>{if(r.length-t===0)return s.classGroupId;const a=r[t],u=s.nextPart.get(a);if(u){const m=jg(r,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const h=t===0?r.join($a):r.slice(t).join($a),p=d.length;for(let m=0;mr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?Vx+o:void 0})(),Qx=r=>{const{theme:t,classGroups:s}=r;return Kx(s,t)},Kx=(r,t)=>{const s=Lg();for(const o in r){const a=r[o];Zc(a,s,o,t)}return s},Zc=(r,t,s,o)=>{const a=r.length;for(let u=0;u{if(typeof r=="string"){Yx(r,t,s);return}if(typeof r=="function"){Xx(r,t,s,o);return}Jx(r,t,s,o)},Yx=(r,t,s)=>{const o=r===""?t:Dg(t,r);o.classGroupId=s},Xx=(r,t,s,o)=>{if(Zx(r)){Zc(r(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Wx(s,r))},Jx=(r,t,s,o)=>{const a=Object.entries(r),u=a.length;for(let d=0;d{let s=r;const o=t.split($a),a=o.length;for(let u=0;u"isThemeGetter"in r&&r.isThemeGetter===!0,e1=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>r&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},mc="!",Ap=":",t1=[],Lp=(r,t,s,o,a)=>({modifiers:r,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:a}),n1=r=>{const{prefix:t,experimentalParseClassName:s}=r;let o=a=>{const u=[];let d=0,h=0,p=0,m;const g=a.length;for(let k=0;kp?m-p:void 0;return Lp(u,O,S,F)};if(t){const a=t+Ap,u=o;o=d=>d.startsWith(a)?u(d.slice(a.length)):Lp(t1,!1,d,void 0,!0)}if(s){const a=o;o=u=>s({className:u,parseClassName:a})}return o},r1=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let a=[];for(let u=0;u0&&(a.sort(),o.push(...a),a=[]),o.push(d)):a.push(d)}return a.length>0&&(a.sort(),o.push(...a)),o}},s1=r=>({cache:e1(r.cacheSize),parseClassName:n1(r),sortModifiers:r1(r),...Hx(r)}),o1=/\s+/,i1=(r,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],h=r.trim().split(o1);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:v,modifiers:S,hasImportantModifier:O,baseClassName:F,maybePostfixModifierPosition:k}=s(g);if(v){p=g+(p.length>0?" "+p:p);continue}let x=!!k,E=o(x?F.substring(0,k):F);if(!E){if(!x){p=g+(p.length>0?" "+p:p);continue}if(E=o(F),!E){p=g+(p.length>0?" "+p:p);continue}x=!1}const j=S.length===0?"":S.length===1?S[0]:u(S).join(":"),P=O?j+mc:j,L=P+E;if(d.indexOf(L)>-1)continue;d.push(L);const W=a(E,x);for(let $=0;$0?" "+p:p)}return p},a1=(...r)=>{let t=0,s,o,a="";for(;t{if(typeof r=="string")return r;let t,s="";for(let o=0;o{let s,o,a,u;const d=p=>{const m=t.reduce((g,v)=>v(g),r());return s=s1(m),o=s.cache.get,a=s.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const g=i1(p,s);return a(p,g),g};return u=d,(...p)=>u(a1(...p))},u1=[],et=r=>{const t=s=>s[r]||u1;return t.isThemeGetter=!0,t},Fg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ug=/^\((?:(\w[\w-]*):)?(.+)\)$/i,c1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,d1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,f1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,h1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,p1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,m1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=r=>c1.test(r),ke=r=>!!r&&!Number.isNaN(Number(r)),or=r=>!!r&&Number.isInteger(Number(r)),Ju=r=>r.endsWith("%")&&ke(r.slice(0,-1)),On=r=>d1.test(r),Mg=()=>!0,g1=r=>f1.test(r)&&!h1.test(r),ed=()=>!1,y1=r=>p1.test(r),v1=r=>m1.test(r),w1=r=>!re(r)&&!se(r),x1=r=>xr(r,$g,ed),re=r=>Fg.test(r),jr=r=>xr(r,Wg,g1),jp=r=>xr(r,R1,ke),b1=r=>xr(r,Hg,Mg),E1=r=>xr(r,Vg,ed),Dp=r=>xr(r,zg,ed),S1=r=>xr(r,Bg,v1),ka=r=>xr(r,qg,y1),se=r=>Ug.test(r),Io=r=>ts(r,Wg),_1=r=>ts(r,Vg),Ip=r=>ts(r,zg),k1=r=>ts(r,$g),C1=r=>ts(r,Bg),Ca=r=>ts(r,qg,!0),T1=r=>ts(r,Hg,!0),xr=(r,t,s)=>{const o=Fg.exec(r);return o?o[1]?t(o[1]):s(o[2]):!1},ts=(r,t,s=!1)=>{const o=Ug.exec(r);return o?o[1]?t(o[1]):s:!1},zg=r=>r==="position"||r==="percentage",Bg=r=>r==="image"||r==="url",$g=r=>r==="length"||r==="size"||r==="bg-size",Wg=r=>r==="length",R1=r=>r==="number",Vg=r=>r==="family-name",Hg=r=>r==="number"||r==="weight",qg=r=>r==="shadow",P1=()=>{const r=et("color"),t=et("font"),s=et("text"),o=et("font-weight"),a=et("tracking"),u=et("leading"),d=et("breakpoint"),h=et("container"),p=et("spacing"),m=et("radius"),g=et("shadow"),v=et("inset-shadow"),S=et("text-shadow"),O=et("drop-shadow"),F=et("blur"),k=et("perspective"),x=et("aspect"),E=et("ease"),j=et("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],W=()=>[...L(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,p],ie=()=>[sr,"full","auto",...B()],ue=()=>[or,"none","subgrid",se,re],be=()=>["auto",{span:["full",or,se,re]},or,se,re],Re=()=>[or,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Se=()=>["start","end","center","stretch","center-safe","end-safe"],Ee=()=>["auto",...B()],_e=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],M=()=>[r,se,re],N=()=>[...L(),Ip,Dp,{position:[se,re]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",k1,x1,{size:[se,re]}],me=()=>[Ju,Io,jr],he=()=>["","none","full",m,se,re],Y=()=>["",ke,Io,jr],ve=()=>["solid","dashed","dotted","double"],Te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,Ju,Ip,Dp],tt=()=>["","none",F,se,re],Ft=()=>["none",ke,se,re],it=()=>["none",ke,se,re],Gt=()=>[ke,se,re],Ut=()=>[sr,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[Mg],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[w1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",ke],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,h]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:W()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",se,re]}],basis:[{basis:[sr,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,sr,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[or,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Se(),"normal"]}],"justify-self":[{"justify-self":["auto",...Se()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Se(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Se(),"baseline"]}],"place-self":[{"place-self":["auto",...Se()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Ee()}],mx:[{mx:Ee()}],my:[{my:Ee()}],ms:[{ms:Ee()}],me:[{me:Ee()}],mbs:[{mbs:Ee()}],mbe:[{mbe:Ee()}],mt:[{mt:Ee()}],mr:[{mr:Ee()}],mb:[{mb:Ee()}],ml:[{ml:Ee()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",..._e()]}],"min-w":[{"min-w":[h,"screen","none",..._e()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",s,Io,jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,T1,b1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ju,re]}],"font-family":[{font:[_1,E1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,jp]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,jr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,se,re],radial:["",se,re],conic:[or,se,re]},C1,S1]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Io,jr]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",g,Ca,ka]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",v,Ca,ka]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ke,jr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",S,Ca,ka]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:tt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",O,Ca,ka]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",E,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",j,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,se,re]}],"perspective-origin":[{"perspective-origin":W()}],rotate:[{rotate:Ft()}],"rotate-x":[{"rotate-x":Ft()}],"rotate-y":[{"rotate-y":Ft()}],"rotate-z":[{"rotate-z":Ft()}],scale:[{scale:it()}],"scale-x":[{"scale-x":it()}],"scale-y":[{"scale-y":it()}],"scale-z":[{"scale-z":it()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:W()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ke,Io,jr,jp]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},N1=l1(P1);function Vs(...r){return N1(Pg(r))}const O1=Sx,Qg=_.forwardRef(({className:r,...t},s)=>w.jsx(Eg,{ref:s,className:Vs("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...t}));Qg.displayName=Eg.displayName;const A1=_x("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Kg=_.forwardRef(({className:r,variant:t,...s},o)=>w.jsx(Sg,{ref:o,className:Vs(A1({variant:t}),r),...s}));Kg.displayName=Sg.displayName;const L1=_.forwardRef(({className:r,...t},s)=>w.jsx(Cg,{ref:s,className:Vs("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...t}));L1.displayName=Cg.displayName;const Gg=_.forwardRef(({className:r,...t},s)=>w.jsx(Tg,{ref:s,className:Vs("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...t,children:w.jsx(Ag,{className:"h-4 w-4"})}));Gg.displayName=Tg.displayName;const Yg=_.forwardRef(({className:r,...t},s)=>w.jsx(_g,{ref:s,className:Vs("text-sm font-semibold",r),...t}));Yg.displayName=_g.displayName;const Xg=_.forwardRef(({className:r,...t},s)=>w.jsx(kg,{ref:s,className:Vs("text-sm opacity-90",r),...t}));Xg.displayName=kg.displayName;function j1(){const{toasts:r}=k0();return w.jsxs(O1,{children:[r.map(function({id:t,title:s,description:o,action:a,...u}){return w.jsxs(Kg,{...u,children:[w.jsxs("div",{className:"grid gap-1",children:[s&&w.jsx(Yg,{children:s}),o&&w.jsx(Xg,{children:o})]}),a,w.jsx(Gg,{})]},t)}),w.jsx(Qg,{})]})}var oi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},D1={setTimeout:(r,t)=>setTimeout(r,t),clearTimeout:r=>clearTimeout(r),setInterval:(r,t)=>setInterval(r,t),clearInterval:r=>clearInterval(r)},lr,Vc,$m,I1=($m=class{constructor(){pe(this,lr,D1);pe(this,Vc,!1)}setTimeoutProvider(r){ee(this,lr,r)}setTimeout(r,t){return T(this,lr).setTimeout(r,t)}clearTimeout(r){T(this,lr).clearTimeout(r)}setInterval(r,t){return T(this,lr).setInterval(r,t)}clearInterval(r){T(this,lr).clearInterval(r)}},lr=new WeakMap,Vc=new WeakMap,$m),Fr=new I1;function F1(r){setTimeout(r,0)}var Jr=typeof window>"u"||"Deno"in globalThis;function Nt(){}function U1(r,t){return typeof r=="function"?r(t):r}function gc(r){return typeof r=="number"&&r>=0&&r!==1/0}function Jg(r,t){return Math.max(r+(t||0)-Date.now(),0)}function yr(r,t){return typeof r=="function"?r(t):r}function Qt(r,t){return typeof r=="function"?r(t):r}function Fp(r,t){const{type:s="all",exact:o,fetchStatus:a,predicate:u,queryKey:d,stale:h}=r;if(d){if(o){if(t.queryHash!==td(d,t.options))return!1}else if(!Go(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||a&&a!==t.state.fetchStatus||u&&!u(t))}function Up(r,t){const{exact:s,status:o,predicate:a,mutationKey:u}=r;if(u){if(!t.options.mutationKey)return!1;if(s){if(Ko(t.options.mutationKey)!==Ko(u))return!1}else if(!Go(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||a&&!a(t))}function td(r,t){return((t==null?void 0:t.queryKeyHashFn)||Ko)(r)}function Ko(r){return JSON.stringify(r,(t,s)=>vc(s)?Object.keys(s).sort().reduce((o,a)=>(o[a]=s[a],o),{}):s)}function Go(r,t){return r===t?!0:typeof r!=typeof t?!1:r&&t&&typeof r=="object"&&typeof t=="object"?Object.keys(t).every(s=>Go(r[s],t[s])):!1}var M1=Object.prototype.hasOwnProperty;function Zg(r,t,s=0){if(r===t)return r;if(s>500)return t;const o=Mp(r)&&Mp(t);if(!o&&!(vc(r)&&vc(t)))return t;const u=(o?r:Object.keys(r)).length,d=o?t:Object.keys(t),h=d.length,p=o?new Array(h):{};let m=0;for(let g=0;g{Fr.setTimeout(t,r)})}function wc(r,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(r,t):s.structuralSharing!==!1?Zg(r,t):t}function B1(r,t,s=0){const o=[...r,t];return s&&o.length>s?o.slice(1):o}function $1(r,t,s=0){const o=[t,...r];return s&&o.length>s?o.slice(0,-1):o}var nd=Symbol();function ey(r,t){return!r.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!r.queryFn||r.queryFn===nd?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function ty(r,t){return typeof r=="function"?r(...t):!!r}function W1(r,t,s){let o=!1,a;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(a??(a=t()),o||(o=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),r}var Mr,ur,Ns,Wm,V1=(Wm=class extends oi{constructor(){super();pe(this,Mr);pe(this,ur);pe(this,Ns);ee(this,Ns,t=>{if(!Jr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){T(this,ur)||this.setEventListener(T(this,Ns))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,ur))==null||t.call(this),ee(this,ur,void 0))}setEventListener(t){var s;ee(this,Ns,t),(s=T(this,ur))==null||s.call(this),ee(this,ur,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){T(this,Mr)!==t&&(ee(this,Mr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof T(this,Mr)=="boolean"?T(this,Mr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Mr=new WeakMap,ur=new WeakMap,Ns=new WeakMap,Wm),rd=new V1;function xc(){let r,t;const s=new Promise((a,u)=>{r=a,t=u});s.status="pending",s.catch(()=>{});function o(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{o({status:"fulfilled",value:a}),r(a)},s.reject=a=>{o({status:"rejected",reason:a}),t(a)},s}var H1=F1;function q1(){let r=[],t=0,s=h=>{h()},o=h=>{h()},a=H1;const u=h=>{t?r.push(h):a(()=>{s(h)})},d=()=>{const h=r;r=[],h.length&&a(()=>{o(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{a=h}}}var dt=q1(),Os,cr,As,Vm,Q1=(Vm=class extends oi{constructor(){super();pe(this,Os,!0);pe(this,cr);pe(this,As);ee(this,As,t=>{if(!Jr&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){T(this,cr)||this.setEventListener(T(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,As,t),(s=T(this,cr))==null||s.call(this),ee(this,cr,t(this.setOnline.bind(this)))}setOnline(t){T(this,Os)!==t&&(ee(this,Os,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return T(this,Os)}},Os=new WeakMap,cr=new WeakMap,As=new WeakMap,Vm),Wa=new Q1;function K1(r){return Math.min(1e3*2**r,3e4)}function ny(r){return(r??"online")==="online"?Wa.isOnline():!0}var bc=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function ry(r){let t=!1,s=0,o;const a=xc(),u=()=>a.status!=="pending",d=k=>{var x;if(!u()){const E=new bc(k);S(E),(x=r.onCancel)==null||x.call(r,E)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>rd.isFocused()&&(r.networkMode==="always"||Wa.isOnline())&&r.canRun(),g=()=>ny(r.networkMode)&&r.canRun(),v=k=>{u()||(o==null||o(),a.resolve(k))},S=k=>{u()||(o==null||o(),a.reject(k))},O=()=>new Promise(k=>{var x;o=E=>{(u()||m())&&k(E)},(x=r.onPause)==null||x.call(r)}).then(()=>{var k;o=void 0,u()||(k=r.onContinue)==null||k.call(r)}),F=()=>{if(u())return;let k;const x=s===0?r.initialPromise:void 0;try{k=x??r.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(v).catch(E=>{var $;if(u())return;const j=r.retry??(Jr?0:3),P=r.retryDelay??K1,L=typeof P=="function"?P(s,E):P,W=j===!0||typeof j=="number"&&sm()?void 0:O()).then(()=>{t?S(E):F()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(o==null||o(),a),cancelRetry:h,continueRetry:p,canStart:g,start:()=>(g()?F():O().then(F),a)}}var zr,Hm,sy=(Hm=class{constructor(){pe(this,zr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gc(this.gcTime)&&ee(this,zr,Fr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Jr?1/0:300*1e3))}clearGcTimeout(){T(this,zr)&&(Fr.clearTimeout(T(this,zr)),ee(this,zr,void 0))}},zr=new WeakMap,Hm),Br,Ls,qt,$r,ot,Zo,Wr,on,An,qm,G1=(qm=class extends sy{constructor(t){super();pe(this,on);pe(this,Br);pe(this,Ls);pe(this,qt);pe(this,$r);pe(this,ot);pe(this,Zo);pe(this,Wr);ee(this,Wr,!1),ee(this,Zo,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,$r,t.client),ee(this,qt,T(this,$r).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Br,$p(this.options)),this.state=t.state??T(this,Br),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,ot))==null?void 0:t.promise}setOptions(t){if(this.options={...T(this,Zo),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=$p(this.options);s.data!==void 0&&(this.setState(Bp(s.data,s.dataUpdatedAt)),ee(this,Br,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,qt).remove(this)}setData(t,s){const o=wc(this.state.data,t,this.options);return Pe(this,on,An).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Pe(this,on,An).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,a;const s=(o=T(this,ot))==null?void 0:o.promise;return(a=T(this,ot))==null||a.cancel(t),s?s.then(Nt).catch(Nt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Br))}isActive(){return this.observers.some(t=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>yr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Jg(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=T(this,ot))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=T(this,ot))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,qt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(T(this,ot)&&(T(this,Wr)?T(this,ot).cancel({revert:!0}):T(this,ot).cancelRetry()),this.scheduleGc()),T(this,qt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,on,An).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,g,v,S,O,F,k,x,E,j,P;if(this.state.fetchStatus!=="idle"&&((p=T(this,ot))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(T(this,ot))return T(this,ot).continueRetry(),T(this,ot).promise}if(t&&this.setOptions(t),!this.options.queryFn){const L=this.observers.find(W=>W.options.queryFn);L&&this.setOptions(L.options)}const o=new AbortController,a=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(ee(this,Wr,!0),o.signal)})},u=()=>{const L=ey(this.options,s),$=(()=>{const G={client:T(this,$r),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,Wr,!1),this.options.persister?this.options.persister(L,$,this):L($)},h=(()=>{const L={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:T(this,$r),state:this.state,fetchFn:u};return a(L),L})();(m=this.options.behavior)==null||m.onFetch(h,this),ee(this,Ls,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=h.fetchOptions)==null?void 0:g.meta))&&Pe(this,on,An).call(this,{type:"fetch",meta:(v=h.fetchOptions)==null?void 0:v.meta}),ee(this,ot,ry({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:L=>{L instanceof bc&&L.revert&&this.setState({...T(this,Ls),fetchStatus:"idle"}),o.abort()},onFail:(L,W)=>{Pe(this,on,An).call(this,{type:"failed",failureCount:L,error:W})},onPause:()=>{Pe(this,on,An).call(this,{type:"pause"})},onContinue:()=>{Pe(this,on,An).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const L=await T(this,ot).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(O=(S=T(this,qt).config).onSuccess)==null||O.call(S,L,this),(k=(F=T(this,qt).config).onSettled)==null||k.call(F,L,this.state.error,this),L}catch(L){if(L instanceof bc){if(L.silent)return T(this,ot).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw Pe(this,on,An).call(this,{type:"error",error:L}),(E=(x=T(this,qt).config).onError)==null||E.call(x,L,this),(P=(j=T(this,qt).config).onSettled)==null||P.call(j,this.state.data,L,this),L}finally{this.scheduleGc()}}},Br=new WeakMap,Ls=new WeakMap,qt=new WeakMap,$r=new WeakMap,ot=new WeakMap,Zo=new WeakMap,Wr=new WeakMap,on=new WeakSet,An=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...oy(o.data,this.options),fetchMeta:t.meta??null};case"success":const a={...o,...Bp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Ls,t.manual?a:void 0),a;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),dt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),T(this,qt).notify({query:this,type:"updated",action:t})})},qm);function oy(r,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ny(t.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Bp(r,t){return{data:r,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $p(r){const t=typeof r.initialData=="function"?r.initialData():r.initialData,s=t!==void 0,o=s?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Ne,ei,Et,Vr,js,Ln,dr,ti,Ds,Is,Hr,qr,fr,Fs,De,zo,Ec,Sc,_c,kc,Cc,Tc,Rc,iy,Qm,Y1=(Qm=class extends oi{constructor(t,s){super();pe(this,De);pe(this,Pt);pe(this,Ne);pe(this,ei);pe(this,Et);pe(this,Vr);pe(this,js);pe(this,Ln);pe(this,dr);pe(this,ti);pe(this,Ds);pe(this,Is);pe(this,Hr);pe(this,qr);pe(this,fr);pe(this,Fs,new Set);this.options=s,ee(this,Pt,t),ee(this,dr,null),ee(this,Ln,xc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Ne).addObserver(this),Wp(T(this,Ne),this.options)?Pe(this,De,zo).call(this):this.updateResult(),Pe(this,De,kc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pc(T(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pc(T(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,De,Cc).call(this),Pe(this,De,Tc).call(this),T(this,Ne).removeObserver(this)}setOptions(t){const s=this.options,o=T(this,Ne);if(this.options=T(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,T(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,De,Rc).call(this),T(this,Ne).setOptions(this.options),s._defaulted&&!yc(this.options,s)&&T(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Ne),observer:this});const a=this.hasListeners();a&&Vp(T(this,Ne),o,this.options,s)&&Pe(this,De,zo).call(this),this.updateResult(),a&&(T(this,Ne)!==o||Qt(this.options.enabled,T(this,Ne))!==Qt(s.enabled,T(this,Ne))||yr(this.options.staleTime,T(this,Ne))!==yr(s.staleTime,T(this,Ne)))&&Pe(this,De,Ec).call(this);const u=Pe(this,De,Sc).call(this);a&&(T(this,Ne)!==o||Qt(this.options.enabled,T(this,Ne))!==Qt(s.enabled,T(this,Ne))||u!==T(this,fr))&&Pe(this,De,_c).call(this,u)}getOptimisticResult(t){const s=T(this,Pt).getQueryCache().build(T(this,Pt),t),o=this.createResult(s,t);return J1(this,o)&&(ee(this,Et,o),ee(this,js,this.options),ee(this,Vr,T(this,Ne).state)),o}getCurrentResult(){return T(this,Et)}trackResult(t,s){return new Proxy(t,{get:(o,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&T(this,Ln).status==="pending"&&T(this,Ln).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(t){T(this,Fs).add(t)}getCurrentQuery(){return T(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=T(this,Pt).defaultQueryOptions(t),o=T(this,Pt).getQueryCache().build(T(this,Pt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Pe(this,De,zo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,Et)))}createResult(t,s){var ie;const o=T(this,Ne),a=this.options,u=T(this,Et),d=T(this,Vr),h=T(this,js),m=t!==o?t.state:T(this,ei),{state:g}=t;let v={...g},S=!1,O;if(s._optimisticResults){const ue=this.hasListeners(),be=!ue&&Wp(t,s),Re=ue&&Vp(t,o,s,a);(be||Re)&&(v={...v,...oy(g.data,t.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:F,errorUpdatedAt:k,status:x}=v;O=v.data;let E=!1;if(s.placeholderData!==void 0&&O===void 0&&x==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,E=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=T(this,Is))==null?void 0:ie.state.data,T(this,Is)):s.placeholderData,ue!==void 0&&(x="success",O=wc(u==null?void 0:u.data,ue,s),S=!0)}if(s.select&&O!==void 0&&!E)if(u&&O===(d==null?void 0:d.data)&&s.select===T(this,ti))O=T(this,Ds);else try{ee(this,ti,s.select),O=s.select(O),O=wc(u==null?void 0:u.data,O,s),ee(this,Ds,O),ee(this,dr,null)}catch(ue){ee(this,dr,ue)}T(this,dr)&&(F=T(this,dr),O=T(this,Ds),k=Date.now(),x="error");const j=v.fetchStatus==="fetching",P=x==="pending",L=x==="error",W=P&&j,$=O!==void 0,B={status:x,fetchStatus:v.fetchStatus,isPending:P,isSuccess:x==="success",isError:L,isInitialLoading:W,isLoading:W,data:O,dataUpdatedAt:v.dataUpdatedAt,error:F,errorUpdatedAt:k,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:j,isRefetching:j&&!P,isLoadingError:L&&!$,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:L&&$,isStale:sd(t,s),refetch:this.refetch,promise:T(this,Ln),isEnabled:Qt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=B.data!==void 0,be=B.status==="error"&&!ue,Re=Se=>{be?Se.reject(B.error):ue&&Se.resolve(B.data)},xe=()=>{const Se=ee(this,Ln,B.promise=xc());Re(Se)},J=T(this,Ln);switch(J.status){case"pending":t.queryHash===o.queryHash&&Re(J);break;case"fulfilled":(be||B.data!==J.value)&&xe();break;case"rejected":(!be||B.error!==J.reason)&&xe();break}}return B}updateResult(){const t=T(this,Et),s=this.createResult(T(this,Ne),this.options);if(ee(this,Vr,T(this,Ne).state),ee(this,js,this.options),T(this,Vr).data!==void 0&&ee(this,Is,T(this,Ne)),yc(s,t))return;ee(this,Et,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!T(this,Fs).size)return!0;const d=new Set(u??T(this,Fs));return this.options.throwOnError&&d.add("error"),Object.keys(T(this,Et)).some(h=>{const p=h;return T(this,Et)[p]!==t[p]&&d.has(p)})};Pe(this,De,iy).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,De,kc).call(this)}},Pt=new WeakMap,Ne=new WeakMap,ei=new WeakMap,Et=new WeakMap,Vr=new WeakMap,js=new WeakMap,Ln=new WeakMap,dr=new WeakMap,ti=new WeakMap,Ds=new WeakMap,Is=new WeakMap,Hr=new WeakMap,qr=new WeakMap,fr=new WeakMap,Fs=new WeakMap,De=new WeakSet,zo=function(t){Pe(this,De,Rc).call(this);let s=T(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Nt)),s},Ec=function(){Pe(this,De,Cc).call(this);const t=yr(this.options.staleTime,T(this,Ne));if(Jr||T(this,Et).isStale||!gc(t))return;const o=Jg(T(this,Et).dataUpdatedAt,t)+1;ee(this,Hr,Fr.setTimeout(()=>{T(this,Et).isStale||this.updateResult()},o))},Sc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Ne)):this.options.refetchInterval)??!1},_c=function(t){Pe(this,De,Tc).call(this),ee(this,fr,t),!(Jr||Qt(this.options.enabled,T(this,Ne))===!1||!gc(T(this,fr))||T(this,fr)===0)&&ee(this,qr,Fr.setInterval(()=>{(this.options.refetchIntervalInBackground||rd.isFocused())&&Pe(this,De,zo).call(this)},T(this,fr)))},kc=function(){Pe(this,De,Ec).call(this),Pe(this,De,_c).call(this,Pe(this,De,Sc).call(this))},Cc=function(){T(this,Hr)&&(Fr.clearTimeout(T(this,Hr)),ee(this,Hr,void 0))},Tc=function(){T(this,qr)&&(Fr.clearInterval(T(this,qr)),ee(this,qr,void 0))},Rc=function(){const t=T(this,Pt).getQueryCache().build(T(this,Pt),this.options);if(t===T(this,Ne))return;const s=T(this,Ne);ee(this,Ne,t),ee(this,ei,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},iy=function(t){dt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(T(this,Et))}),T(this,Pt).getQueryCache().notify({query:T(this,Ne),type:"observerResultsUpdated"})})},Qm);function X1(r,t){return Qt(t.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&t.retryOnMount===!1)}function Wp(r,t){return X1(r,t)||r.state.data!==void 0&&Pc(r,t,t.refetchOnMount)}function Pc(r,t,s){if(Qt(t.enabled,r)!==!1&&yr(t.staleTime,r)!=="static"){const o=typeof s=="function"?s(r):s;return o==="always"||o!==!1&&sd(r,t)}return!1}function Vp(r,t,s,o){return(r!==t||Qt(o.enabled,r)===!1)&&(!s.suspense||r.state.status!=="error")&&sd(r,s)}function sd(r,t){return Qt(t.enabled,r)!==!1&&r.isStaleByTime(yr(t.staleTime,r))}function J1(r,t){return!yc(r.getCurrentResult(),t)}function Hp(r){return{onFetch:(t,s)=>{var g,v,S,O,F;const o=t.options,a=(S=(v=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,u=((O=t.state.data)==null?void 0:O.pages)||[],d=((F=t.state.data)==null?void 0:F.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let k=!1;const x=P=>{W1(P,()=>t.signal,()=>k=!0)},E=ey(t.options,t.fetchOptions),j=async(P,L,W)=>{if(k)return Promise.reject();if(L==null&&P.pages.length)return Promise.resolve(P);const G=(()=>{const be={client:t.client,queryKey:t.queryKey,pageParam:L,direction:W?"backward":"forward",meta:t.options.meta};return x(be),be})(),B=await E(G),{maxPages:ie}=t.options,ue=W?$1:B1;return{pages:ue(P.pages,B,ie),pageParams:ue(P.pageParams,L,ie)}};if(a&&u.length){const P=a==="backward",L=P?Z1:qp,W={pages:u,pageParams:d},$=L(o,W);h=await j(W,$,P)}else{const P=r??u.length;do{const L=p===0?d[0]??o.initialPageParam:qp(o,h);if(p>0&&L==null)break;h=await j(h,L),p++}while(p{var k,x;return(x=(k=t.options).persister)==null?void 0:x.call(k,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function qp(r,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?r.getNextPageParam(t[o],t,s[o],s):void 0}function Z1(r,{pages:t,pageParams:s}){var o;return t.length>0?(o=r.getPreviousPageParam)==null?void 0:o.call(r,t[0],t,s[0],s):void 0}var ni,gn,vt,Qr,yn,ar,Km,eb=(Km=class extends sy{constructor(t){super();pe(this,yn);pe(this,ni);pe(this,gn);pe(this,vt);pe(this,Qr);ee(this,ni,t.client),this.mutationId=t.mutationId,ee(this,vt,t.mutationCache),ee(this,gn,[]),this.state=t.state||tb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,gn).includes(t)||(T(this,gn).push(t),this.clearGcTimeout(),T(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,gn,T(this,gn).filter(s=>s!==t)),this.scheduleGc(),T(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,gn).length||(this.state.status==="pending"?this.scheduleGc():T(this,vt).remove(this))}continue(){var t;return((t=T(this,Qr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,m,g,v,S,O,F,k,x,E,j,P,L,W,$,G;const s=()=>{Pe(this,yn,ar).call(this,{type:"continue"})},o={client:T(this,ni),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Qr,ry({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(B,ie)=>{Pe(this,yn,ar).call(this,{type:"failed",failureCount:B,error:ie})},onPause:()=>{Pe(this,yn,ar).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,vt).canRun(this)}));const a=this.state.status==="pending",u=!T(this,Qr).canStart();try{if(a)s();else{Pe(this,yn,ar).call(this,{type:"pending",variables:t,isPaused:u}),T(this,vt).config.onMutate&&await T(this,vt).config.onMutate(t,this,o);const ie=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,o));ie!==this.state.context&&Pe(this,yn,ar).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const B=await T(this,Qr).start();return await((m=(p=T(this,vt).config).onSuccess)==null?void 0:m.call(p,B,t,this.state.context,this,o)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,B,t,this.state.context,o)),await((O=(S=T(this,vt).config).onSettled)==null?void 0:O.call(S,B,null,this.state.variables,this.state.context,this,o)),await((k=(F=this.options).onSettled)==null?void 0:k.call(F,B,null,t,this.state.context,o)),Pe(this,yn,ar).call(this,{type:"success",data:B}),B}catch(B){try{await((E=(x=T(this,vt).config).onError)==null?void 0:E.call(x,B,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((P=(j=this.options).onError)==null?void 0:P.call(j,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await((W=(L=T(this,vt).config).onSettled)==null?void 0:W.call(L,void 0,B,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Pe(this,yn,ar).call(this,{type:"error",error:B}),B}finally{T(this,vt).runNext(this)}}},ni=new WeakMap,gn=new WeakMap,vt=new WeakMap,Qr=new WeakMap,yn=new WeakSet,ar=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),dt.batch(()=>{T(this,gn).forEach(o=>{o.onMutationUpdate(t)}),T(this,vt).notify({mutation:this,type:"updated",action:t})})},Km);function tb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jn,an,ri,Gm,nb=(Gm=class extends oi{constructor(t={}){super();pe(this,jn);pe(this,an);pe(this,ri);this.config=t,ee(this,jn,new Set),ee(this,an,new Map),ee(this,ri,0)}build(t,s,o){const a=new eb({client:t,mutationCache:this,mutationId:++xa(this,ri)._,options:t.defaultMutationOptions(s),state:o});return this.add(a),a}add(t){T(this,jn).add(t);const s=Ta(t);if(typeof s=="string"){const o=T(this,an).get(s);o?o.push(t):T(this,an).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,jn).delete(t)){const s=Ta(t);if(typeof s=="string"){const o=T(this,an).get(s);if(o)if(o.length>1){const a=o.indexOf(t);a!==-1&&o.splice(a,1)}else o[0]===t&&T(this,an).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Ta(t);if(typeof s=="string"){const o=T(this,an).get(s),a=o==null?void 0:o.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var o;const s=Ta(t);if(typeof s=="string"){const a=(o=T(this,an).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{T(this,jn).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,jn).clear(),T(this,an).clear()})}getAll(){return Array.from(T(this,jn))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Up(s,o))}findAll(t={}){return this.getAll().filter(s=>Up(t,s))}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return dt.batch(()=>Promise.all(t.map(s=>s.continue().catch(Nt))))}},jn=new WeakMap,an=new WeakMap,ri=new WeakMap,Gm);function Ta(r){var t;return(t=r.options.scope)==null?void 0:t.id}var vn,Ym,rb=(Ym=class extends oi{constructor(t={}){super();pe(this,vn);this.config=t,ee(this,vn,new Map)}build(t,s,o){const a=s.queryKey,u=s.queryHash??td(a,s);let d=this.get(u);return d||(d=new G1({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){T(this,vn).has(t.queryHash)||(T(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=T(this,vn).get(t.queryHash);s&&(t.destroy(),s===t&&T(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,vn).get(t)}getAll(){return[...T(this,vn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Fp(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>Fp(t,o)):s}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,Ym),He,hr,pr,Us,Ms,mr,zs,Bs,Xm,sb=(Xm=class{constructor(r={}){pe(this,He);pe(this,hr);pe(this,pr);pe(this,Us);pe(this,Ms);pe(this,mr);pe(this,zs);pe(this,Bs);ee(this,He,r.queryCache||new rb),ee(this,hr,r.mutationCache||new nb),ee(this,pr,r.defaultOptions||{}),ee(this,Us,new Map),ee(this,Ms,new Map),ee(this,mr,0)}mount(){xa(this,mr)._++,T(this,mr)===1&&(ee(this,zs,rd.subscribe(async r=>{r&&(await this.resumePausedMutations(),T(this,He).onFocus())})),ee(this,Bs,Wa.subscribe(async r=>{r&&(await this.resumePausedMutations(),T(this,He).onOnline())})))}unmount(){var r,t;xa(this,mr)._--,T(this,mr)===0&&((r=T(this,zs))==null||r.call(this),ee(this,zs,void 0),(t=T(this,Bs))==null||t.call(this),ee(this,Bs,void 0))}isFetching(r){return T(this,He).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return T(this,hr).findAll({...r,status:"pending"}).length}getQueryData(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=T(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(r){const t=this.defaultQueryOptions(r),s=T(this,He).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(r):(r.revalidateIfStale&&s.isStaleByTime(yr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(r){return T(this,He).findAll(r).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(r,t,s){const o=this.defaultQueryOptions({queryKey:r}),a=T(this,He).get(o.queryHash),u=a==null?void 0:a.state.data,d=U1(t,u);if(d!==void 0)return T(this,He).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(r,t,s){return dt.batch(()=>T(this,He).findAll(r).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=T(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(r){const t=T(this,He);dt.batch(()=>{t.findAll(r).forEach(s=>{t.remove(s)})})}resetQueries(r,t){const s=T(this,He);return dt.batch(()=>(s.findAll(r).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...r},t)))}cancelQueries(r,t={}){const s={revert:!0,...t},o=dt.batch(()=>T(this,He).findAll(r).map(a=>a.cancel(s)));return Promise.all(o).then(Nt).catch(Nt)}invalidateQueries(r,t={}){return dt.batch(()=>(T(this,He).findAll(r).forEach(s=>{s.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},t)))}refetchQueries(r,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=dt.batch(()=>T(this,He).findAll(r).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Nt)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Nt)}fetchQuery(r){const t=this.defaultQueryOptions(r);t.retry===void 0&&(t.retry=!1);const s=T(this,He).build(this,t);return s.isStaleByTime(yr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Nt).catch(Nt)}fetchInfiniteQuery(r){return r.behavior=Hp(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Nt).catch(Nt)}ensureInfiniteQueryData(r){return r.behavior=Hp(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return Wa.isOnline()?T(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,He)}getMutationCache(){return T(this,hr)}getDefaultOptions(){return T(this,pr)}setDefaultOptions(r){ee(this,pr,r)}setQueryDefaults(r,t){T(this,Us).set(Ko(r),{queryKey:r,defaultOptions:t})}getQueryDefaults(r){const t=[...T(this,Us).values()],s={};return t.forEach(o=>{Go(r,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(r,t){T(this,Ms).set(Ko(r),{mutationKey:r,defaultOptions:t})}getMutationDefaults(r){const t=[...T(this,Ms).values()],s={};return t.forEach(o=>{Go(r,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(r){if(r._defaulted)return r;const t={...T(this,pr).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return t.queryHash||(t.queryHash=td(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nd&&(t.enabled=!1),t}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...T(this,pr).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){T(this,He).clear(),T(this,hr).clear()}},He=new WeakMap,hr=new WeakMap,pr=new WeakMap,Us=new WeakMap,Ms=new WeakMap,mr=new WeakMap,zs=new WeakMap,Bs=new WeakMap,Xm),ay=_.createContext(void 0),ob=r=>{const t=_.useContext(ay);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ib=({client:r,children:t})=>(_.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),w.jsx(ay.Provider,{value:r,children:t})),ly=_.createContext(!1),ab=()=>_.useContext(ly);ly.Provider;function lb(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var ub=_.createContext(lb()),cb=()=>_.useContext(ub),db=(r,t,s)=>{const o=s!=null&&s.state.error&&typeof r.throwOnError=="function"?ty(r.throwOnError,[s.state.error,s]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||o)&&(t.isReset()||(r.retryOnMount=!1))},fb=r=>{_.useEffect(()=>{r.clearReset()},[r])},hb=({result:r,errorResetBoundary:t,throwOnError:s,query:o,suspense:a})=>r.isError&&!t.isReset()&&!r.isFetching&&o&&(a&&r.data===void 0||ty(s,[r.error,o])),pb=r=>{if(r.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),o=r.staleTime;r.staleTime=typeof o=="function"?(...a)=>s(o(...a)):s(o),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},mb=(r,t)=>r.isLoading&&r.isFetching&&!t,gb=(r,t)=>(r==null?void 0:r.suspense)&&t.isPending,Qp=(r,t,s)=>t.fetchOptimistic(r).catch(()=>{s.clearReset()});function yb(r,t,s){var S,O,F,k;const o=ab(),a=cb(),u=ob(),d=u.defaultQueryOptions(r);(O=(S=u.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||O.call(S,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",pb(d),db(d,a,h),fb(a);const p=!u.getQueryCache().get(d.queryHash),[m]=_.useState(()=>new t(u,d)),g=m.getOptimisticResult(d),v=!o&&r.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(x=>{const E=v?m.subscribe(dt.batchCalls(x)):Nt;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),_.useEffect(()=>{m.setOptions(d)},[d,m]),gb(d,g))throw Qp(d,m,a);if(hb({result:g,errorResetBoundary:a,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw g.error;if((k=(F=u.getDefaultOptions().queries)==null?void 0:F._experimental_afterQuery)==null||k.call(F,d,g),d.experimental_prefetchInRender&&!Jr&&mb(g,o)){const x=p?Qp(d,m,a):h==null?void 0:h.promise;x==null||x.catch(Nt).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?g:m.trackResult(g)}function vb(r,t){return yb(r,Y1)}const wb=new sb({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Yo(){return Yo=Object.assign?Object.assign.bind():function(r){for(var t=1;t"u")throw new Error(t)}function od(r,t){if(!r){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bb(){return Math.random().toString(36).substr(2,8)}function Gp(r,t){return{usr:r.state,key:r.key,idx:t}}function Nc(r,t,s,o){return s===void 0&&(s=null),Yo({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof t=="string"?Hs(t):t,{state:s,key:t&&t.key||o||bb()})}function Va(r){let{pathname:t="/",search:s="",hash:o=""}=r;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Hs(r){let t={};if(r){let s=r.indexOf("#");s>=0&&(t.hash=r.substr(s),r=r.substr(0,s));let o=r.indexOf("?");o>=0&&(t.search=r.substr(o),r=r.substr(0,o)),r&&(t.pathname=r)}return t}function Eb(r,t,s,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,h=gr.Pop,p=null,m=g();m==null&&(m=0,d.replaceState(Yo({},d.state,{idx:m}),""));function g(){return(d.state||{idx:null}).idx}function v(){h=gr.Pop;let x=g(),E=x==null?null:x-m;m=x,p&&p({action:h,location:k.location,delta:E})}function S(x,E){h=gr.Push;let j=Nc(k.location,x,E);m=g()+1;let P=Gp(j,m),L=k.createHref(j);try{d.pushState(P,"",L)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;a.location.assign(L)}u&&p&&p({action:h,location:k.location,delta:1})}function O(x,E){h=gr.Replace;let j=Nc(k.location,x,E);m=g();let P=Gp(j,m),L=k.createHref(j);d.replaceState(P,"",L),u&&p&&p({action:h,location:k.location,delta:0})}function F(x){let E=a.location.origin!=="null"?a.location.origin:a.location.href,j=typeof x=="string"?x:Va(x);return j=j.replace(/ $/,"%20"),Xe(E,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,E)}let k={get action(){return h},get location(){return r(a,d)},listen(x){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(Kp,v),p=x,()=>{a.removeEventListener(Kp,v),p=null}},createHref(x){return t(a,x)},createURL:F,encodeLocation(x){let E=F(x);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:S,replace:O,go(x){return d.go(x)}};return k}var Yp;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Yp||(Yp={}));function Sb(r,t,s){return s===void 0&&(s="/"),_b(r,t,s)}function _b(r,t,s,o){let a=typeof t=="string"?Hs(t):t,u=id(a.pathname||"/",s);if(u==null)return null;let d=uy(r);kb(d);let h=null,p=Fb(u);for(let m=0;h==null&&m{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Xe(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let m=vr([o,p.relativePath]),g=s.concat(p);u.children&&u.children.length>0&&(Xe(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),uy(u.children,t,g,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:Ab(m,u.index),routesMeta:g})};return r.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))a(u,d);else for(let p of cy(u.path))a(u,d,p)}),t}function cy(r){let t=r.split("/");if(t.length===0)return[];let[s,...o]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return a?[u,""]:[u];let d=cy(o.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),a&&h.push(...d),h.map(p=>r.startsWith("/")&&p===""?"/":p)}function kb(r){r.sort((t,s)=>t.score!==s.score?s.score-t.score:Lb(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const Cb=/^:[\w-]+$/,Tb=3,Rb=2,Pb=1,Nb=10,Ob=-2,Xp=r=>r==="*";function Ab(r,t){let s=r.split("/"),o=s.length;return s.some(Xp)&&(o+=Ob),t&&(o+=Rb),s.filter(a=>!Xp(a)).reduce((a,u)=>a+(Cb.test(u)?Tb:u===""?Pb:Nb),o)}function Lb(r,t){return r.length===t.length&&r.slice(0,-1).every((o,a)=>o===t[a])?r[r.length-1]-t[t.length-1]:0}function jb(r,t,s){let{routesMeta:o}=r,a={},u="/",d=[];for(let h=0;h{let{paramName:S,isOptional:O}=g;if(S==="*"){let k=h[v]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const F=h[v];return O&&!F?m[S]=void 0:m[S]=(F||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:r}}function Ib(r,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),od(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let o=[],a="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(o.push({paramName:"*"}),a+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":r!==""&&r!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function Fb(r){try{return r.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return od(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),r}}function id(r,t){if(t==="/")return r;if(!r.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=r.charAt(s);return o&&o!=="/"?null:r.slice(s)||"/"}const Ub=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mb=r=>Ub.test(r);function zb(r,t){t===void 0&&(t="/");let{pathname:s,search:o="",hash:a=""}=typeof r=="string"?Hs(r):r,u;if(s)if(Mb(s))u=s;else{if(s.includes("//")){let d=s;s=hy(s),od(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=Jp(s.substring(1),"/"):u=Jp(s,t)}else u=t;return{pathname:u,search:Wb(o),hash:Vb(a)}}function Jp(r,t){let s=t.replace(/\/+$/,"").split("/");return r.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function Zu(r,t,s,o){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Bb(r){return r.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function dy(r,t){let s=Bb(r);return t?s.map((o,a)=>a===s.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function fy(r,t,s,o){o===void 0&&(o=!1);let a;typeof r=="string"?a=Hs(r):(a=Yo({},r),Xe(!a.pathname||!a.pathname.includes("?"),Zu("?","pathname","search",a)),Xe(!a.pathname||!a.pathname.includes("#"),Zu("#","pathname","hash",a)),Xe(!a.search||!a.search.includes("#"),Zu("#","search","hash",a)));let u=r===""||a.pathname==="",d=u?"/":a.pathname,h;if(d==null)h=s;else{let v=t.length-1;if(!o&&d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),v-=1;a.pathname=S.join("/")}h=v>=0?t[v]:"/"}let p=zb(a,h),m=d&&d!=="/"&&d.endsWith("/"),g=(u||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}const hy=r=>r.replace(/\/\/+/g,"/"),vr=r=>hy(r.join("/")),$b=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),Wb=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Vb=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Hb(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const py=["post","put","patch","delete"];new Set(py);const qb=["get",...py];new Set(qb);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Xo(){return Xo=Object.assign?Object.assign.bind():function(r){for(var t=1;t{h.current=!0}),_.useCallback(function(m,g){if(g===void 0&&(g={}),!h.current)return;if(typeof m=="number"){o.go(m);return}let v=fy(m,JSON.parse(d),u,g.relative==="path");r==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:vr([t,v.pathname])),(g.replace?o.replace:o.push)(v,g.state,g)},[t,o,d,u,r])}function yy(r,t){let{relative:s}=t===void 0?{}:t,{future:o}=_.useContext(ns),{matches:a}=_.useContext(rs),{pathname:u}=qs(),d=JSON.stringify(dy(a,o.v7_relativeSplatPath));return _.useMemo(()=>fy(r,JSON.parse(d),u,s==="path"),[r,d,u,s])}function Jb(r,t){return Zb(r,t)}function Zb(r,t,s,o){ai()||Xe(!1);let{navigator:a}=_.useContext(ns),{matches:u}=_.useContext(rs),d=u[u.length-1],h=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let m=qs(),g;if(t){var v;let x=typeof t=="string"?Hs(t):t;p==="/"||(v=x.pathname)!=null&&v.startsWith(p)||Xe(!1),g=x}else g=m;let S=g.pathname||"/",O=S;if(p!=="/"){let x=p.replace(/^\//,"").split("/");O="/"+S.replace(/^\//,"").split("/").slice(x.length).join("/")}let F=Sb(r,{pathname:O}),k=sE(F&&F.map(x=>Object.assign({},x,{params:Object.assign({},h,x.params),pathname:vr([p,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?p:vr([p,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,o);return t&&k?_.createElement(ii.Provider,{value:{location:Xo({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:gr.Pop}},k):k}function eE(){let r=lE(),t=Hb(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),s=r instanceof Error?r.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),s?_.createElement("pre",{style:a},s):null,null)}const tE=_.createElement(eE,null);class nE extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?_.createElement(rs.Provider,{value:this.props.routeContext},_.createElement(my.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rE(r){let{routeContext:t,match:s,children:o}=r,a=_.useContext(ad);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),_.createElement(rs.Provider,{value:t},o)}function sE(r,t,s,o){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),r==null){var u;if(!s)return null;if(s.errors)r=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)r=s.matches;else return null}let d=r,h=(a=s)==null?void 0:a.errors;if(h!=null){let g=d.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);g>=0||Xe(!1),d=d.slice(0,Math.min(d.length,g+1))}let p=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let g=0;g=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((g,v,S)=>{let O,F=!1,k=null,x=null;s&&(O=h&&v.route.id?h[v.route.id]:void 0,k=v.route.errorElement||tE,p&&(m<0&&S===0?(cE("route-fallback"),F=!0,x=null):m===S&&(F=!0,x=v.route.hydrateFallbackElement||null)));let E=t.concat(d.slice(0,S+1)),j=()=>{let P;return O?P=k:F?P=x:v.route.Component?P=_.createElement(v.route.Component,null):v.route.element?P=v.route.element:P=g,_.createElement(rE,{match:v,routeContext:{outlet:g,matches:E,isDataRoute:s!=null},children:P})};return s&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?_.createElement(nE,{location:s.location,revalidation:s.revalidation,component:k,error:O,children:j(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):j()},null)}var vy=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(vy||{}),wy=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(wy||{});function oE(r){let t=_.useContext(ad);return t||Xe(!1),t}function iE(r){let t=_.useContext(Qb);return t||Xe(!1),t}function aE(r){let t=_.useContext(rs);return t||Xe(!1),t}function xy(r){let t=aE(),s=t.matches[t.matches.length-1];return s.route.id||Xe(!1),s.route.id}function lE(){var r;let t=_.useContext(my),s=iE(),o=xy();return t!==void 0?t:(r=s.errors)==null?void 0:r[o]}function uE(){let{router:r}=oE(vy.UseNavigateStable),t=xy(wy.UseNavigateStable),s=_.useRef(!1);return gy(()=>{s.current=!0}),_.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?r.navigate(a):r.navigate(a,Xo({fromRouteId:t},u)))},[r,t])}const Zp={};function cE(r,t,s){Zp[r]||(Zp[r]=!0)}function dE(r,t){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function Oc(r){Xe(!1)}function fE(r){let{basename:t="/",children:s=null,location:o,navigationType:a=gr.Pop,navigator:u,static:d=!1,future:h}=r;ai()&&Xe(!1);let p=t.replace(/^\/*/,"/"),m=_.useMemo(()=>({basename:p,navigator:u,static:d,future:Xo({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof o=="string"&&(o=Hs(o));let{pathname:g="/",search:v="",hash:S="",state:O=null,key:F="default"}=o,k=_.useMemo(()=>{let x=id(g,p);return x==null?null:{location:{pathname:x,search:v,hash:S,state:O,key:F},navigationType:a}},[p,g,v,S,O,F,a]);return k==null?null:_.createElement(ns.Provider,{value:m},_.createElement(ii.Provider,{children:s,value:k}))}function hE(r){let{children:t,location:s}=r;return Jb(Ac(t),s)}new Promise(()=>{});function Ac(r,t){t===void 0&&(t=[]);let s=[];return _.Children.forEach(r,(o,a)=>{if(!_.isValidElement(o))return;let u=[...t,a];if(o.type===_.Fragment){s.push.apply(s,Ac(o.props.children,u));return}o.type!==Oc&&Xe(!1),!o.props.index||!o.props.children||Xe(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Ac(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Lc(){return Lc=Object.assign?Object.assign.bind():function(r){for(var t=1;t{m&&em?em(()=>p(v)):p(v)},[p,m]);return _.useLayoutEffect(()=>d.listen(g),[d,g]),_.useEffect(()=>dE(o),[o]),_.createElement(fE,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:o})}const bE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",EE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,un=_.forwardRef(function(t,s){let{onClick:o,relative:a,reloadDocument:u,replace:d,state:h,target:p,to:m,preventScrollReset:g,viewTransition:v}=t,S=pE(t,yE),{basename:O}=_.useContext(ns),F,k=!1;if(typeof m=="string"&&EE.test(m)&&(F=m,bE))try{let P=new URL(window.location.href),L=m.startsWith("//")?new URL(P.protocol+m):new URL(m),W=id(L.pathname,O);L.origin===P.origin&&W!=null?m=W+L.search+L.hash:k=!0}catch{}let x=Kb(m,{relative:a}),E=SE(m,{replace:d,state:h,target:p,preventScrollReset:g,relative:a,viewTransition:v});function j(P){o&&o(P),P.defaultPrevented||E(P)}return _.createElement("a",Lc({},S,{href:F||x,onClick:k||u?o:j,ref:s,target:p}))});var tm;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(tm||(tm={}));var nm;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(nm||(nm={}));function SE(r,t){let{target:s,replace:o,state:a,preventScrollReset:u,relative:d,viewTransition:h}=t===void 0?{}:t,p=Yb(),m=qs(),g=yy(r,{relative:d});return _.useCallback(v=>{if(gE(v,s)){v.preventDefault();let S=o!==void 0?o:Va(m)===Va(g);p(r,{replace:S,state:a,preventScrollReset:u,relative:d,viewTransition:h})}},[m,p,g,o,a,s,r,u,d,h])}function by(r,t){return function(){return r.apply(t,arguments)}}const{toString:_E}=Object.prototype,{getPrototypeOf:$s}=Object,{iterator:li,toStringTag:Ey}=Symbol,Ha=(({hasOwnProperty:r})=>(t,s)=>r.call(t,s))(Object.prototype),Jo=(r,t)=>{let s=r;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),Ha(s,t))return!0;s=$s(s)}return!1},kE=(r,t)=>r!=null&&Jo(r,t)?r[t]:void 0,ld=(r=>t=>{const s=_E.call(t);return r[s]||(r[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),cn=r=>(r=r.toLowerCase(),t=>ld(t)===r),Ga=r=>t=>typeof t===r,{isArray:Zr}=Array,Ws=Ga("undefined");function Qs(r){return r!==null&&!Ws(r)&&r.constructor!==null&&!Ws(r.constructor)&&Ot(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Sy=cn("ArrayBuffer");function CE(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&Sy(r.buffer),t}const TE=Ga("string"),Ot=Ga("function"),_y=Ga("number"),Ks=r=>r!==null&&typeof r=="object",RE=r=>r===!0||r===!1,Da=r=>{if(!Ks(r))return!1;const t=$s(r);return(t===null||t===Object.prototype||$s(t)===null)&&!Jo(r,Ey)&&!Jo(r,li)},PE=r=>{if(!Ks(r)||Qs(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},NE=cn("Date"),OE=cn("File"),AE=r=>!!(r&&typeof r.uri<"u"),LE=r=>r&&typeof r.getParts<"u",jE=cn("Blob"),DE=cn("FileList"),IE=r=>Ks(r)&&Ot(r.pipe);function FE(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const rm=FE(),sm=typeof rm.FormData<"u"?rm.FormData:void 0,UE=r=>{if(!r)return!1;if(sm&&r instanceof sm)return!0;const t=$s(r);if(!t||t===Object.prototype||!Ot(r.append))return!1;const s=ld(r);return s==="formdata"||s==="object"&&Ot(r.toString)&&r.toString()==="[object FormData]"},ME=cn("URLSearchParams"),[zE,BE,$E,WE]=["ReadableStream","Request","Response","Headers"].map(cn),VE=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ui(r,t,{allOwnKeys:s=!1}={}){if(r===null||typeof r>"u")return;let o,a;if(typeof r!="object"&&(r=[r]),Zr(r))for(o=0,a=r.length;o0;)if(a=s[o],t===a.toLowerCase())return a;return null}const Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cy=r=>!Ws(r)&&r!==Ur;function jc(...r){const{caseless:t,skipUndefined:s}=Cy(this)&&this||{},o={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&ky(o,d)||d,p=Ha(o,h)?o[h]:void 0;Da(p)&&Da(u)?o[h]=jc(p,u):Da(u)?o[h]=jc({},u):Zr(u)?o[h]=u.slice():(!s||!Ws(u))&&(o[h]=u)};for(let u=0,d=r.length;u(ui(t,(a,u)=>{s&&Ot(a)?Object.defineProperty(r,u,{__proto__:null,value:by(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),r),qE=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),QE=(r,t,s,o)=>{r.prototype=Object.create(t.prototype,o),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(r.prototype,s)},KE=(r,t,s,o)=>{let a,u,d;const h={};if(t=t||{},r==null)return t;do{for(a=Object.getOwnPropertyNames(r),u=a.length;u-- >0;)d=a[u],(!o||o(d,r,t))&&!h[d]&&(t[d]=r[d],h[d]=!0);r=s!==!1&&$s(r)}while(r&&(!s||s(r,t))&&r!==Object.prototype);return t},GE=(r,t,s)=>{r=String(r),(s===void 0||s>r.length)&&(s=r.length),s-=t.length;const o=r.indexOf(t,s);return o!==-1&&o===s},YE=r=>{if(!r)return null;if(Zr(r))return r;let t=r.length;if(!_y(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=r[t];return s},XE=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&$s(Uint8Array)),JE=(r,t)=>{const o=(r&&r[li]).call(r);let a;for(;(a=o.next())&&!a.done;){const u=a.value;t.call(r,u[0],u[1])}},ZE=(r,t)=>{let s;const o=[];for(;(s=r.exec(t))!==null;)o.push(s);return o},eS=cn("HTMLFormElement"),tS=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,a){return o.toUpperCase()+a}),{propertyIsEnumerable:nS}=Object.prototype,rS=cn("RegExp"),Ty=(r,t)=>{const s=Object.getOwnPropertyDescriptors(r),o={};ui(s,(a,u)=>{let d;(d=t(a,u,r))!==!1&&(o[u]=d||a)}),Object.defineProperties(r,o)},sS=r=>{Ty(r,(t,s)=>{if(Ot(r)&&["arguments","caller","callee"].includes(s))return!1;const o=r[s];if(Ot(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},oS=(r,t)=>{const s={},o=a=>{a.forEach(u=>{s[u]=!0})};return Zr(r)?o(r):o(String(r).split(t)),s},iS=()=>{},aS=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t;function lS(r){return!!(r&&Ot(r.append)&&r[Ey]==="FormData"&&r[li])}const uS=r=>{const t=new WeakSet,s=o=>{if(Ks(o)){if(t.has(o))return;if(Qs(o))return o;if(!("toJSON"in o)){t.add(o);const a=Zr(o)?[]:{};return ui(o,(u,d)=>{const h=s(u);!Ws(h)&&(a[d]=h)}),t.delete(o),a}}return o};return s(r)},cS=cn("AsyncFunction"),dS=r=>r&&(Ks(r)||Ot(r))&&Ot(r.then)&&Ot(r.catch),Ry=((r,t)=>r?setImmediate:t?((s,o)=>(Ur.addEventListener("message",({source:a,data:u})=>{a===Ur&&u===s&&o.length&&o.shift()()},!1),a=>{o.push(a),Ur.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Ot(Ur.postMessage)),fS=typeof queueMicrotask<"u"?queueMicrotask.bind(Ur):typeof process<"u"&&process.nextTick||Ry,Py=r=>r!=null&&Ot(r[li]),hS=r=>r!=null&&Jo(r,li)&&Py(r),A={isArray:Zr,isArrayBuffer:Sy,isBuffer:Qs,isFormData:UE,isArrayBufferView:CE,isString:TE,isNumber:_y,isBoolean:RE,isObject:Ks,isPlainObject:Da,isEmptyObject:PE,isReadableStream:zE,isRequest:BE,isResponse:$E,isHeaders:WE,isUndefined:Ws,isDate:NE,isFile:OE,isReactNativeBlob:AE,isReactNative:LE,isBlob:jE,isRegExp:rS,isFunction:Ot,isStream:IE,isURLSearchParams:ME,isTypedArray:XE,isFileList:DE,forEach:ui,merge:jc,extend:HE,trim:VE,stripBOM:qE,inherits:QE,toFlatObject:KE,kindOf:ld,kindOfTest:cn,endsWith:GE,toArray:YE,forEachEntry:JE,matchAll:ZE,isHTMLForm:eS,hasOwnProperty:Ha,hasOwnProp:Ha,hasOwnInPrototypeChain:Jo,getSafeProp:kE,reduceDescriptors:Ty,freezeMethods:sS,toObjectSet:oS,toCamelCase:tS,noop:iS,toFiniteNumber:aS,findKey:ky,global:Ur,isContextDefined:Cy,isSpecCompliantForm:lS,toJSONObject:uS,isAsyncFn:cS,isThenable:dS,setImmediate:Ry,asap:fS,isIterable:Py,isSafeIterable:hS},pS=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mS=r=>{const t={};let s,o,a;return r&&r.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),o=d.substring(a+1).trim(),!(!s||t[s]&&pS[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function gS(r){let t=0,s=r.length;for(;tt;){const o=r.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===r.length?r:r.slice(t,s)}const yS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),vS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ud(r,t){return A.isArray(r)?r.map(s=>ud(s,t)):gS(String(r).replace(t,""))}const wS=r=>ud(r,yS),xS=r=>ud(r,vS);function Ny(r){const t=Object.create(null);return A.forEach(r.toJSON(),(s,o)=>{t[o]=xS(s)}),t}const om=Symbol("internals");function Fo(r){return r&&String(r).trim().toLowerCase()}function Ia(r){return r===!1||r==null?r:A.isArray(r)?r.map(Ia):wS(String(r))}function bS(r){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(r);)t[o[1]]=o[2];return t}const ES=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ec(r,t,s,o,a){if(A.isFunction(o))return o.call(this,t,s);if(a&&(t=s),!!A.isString(t)){if(A.isString(o))return t.indexOf(o)!==-1;if(A.isRegExp(o))return o.test(t)}}function SS(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function _S(r,t){const s=A.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+s,{__proto__:null,value:function(a,u,d){return this[o].call(this,t,a,u,d)},configurable:!0})})}let wt=class{constructor(t){t&&this.set(t)}set(t,s,o){const a=this;function u(h,p,m){const g=Fo(p);if(!g)return;const v=A.findKey(a,g);(!v||a[v]===void 0||m===!0||m===void 0&&a[v]!==!1)&&(a[v||p]=Ia(h))}const d=(h,p)=>A.forEach(h,(m,g)=>u(m,g,p));if(A.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(A.isString(t)&&(t=t.trim())&&!ES(t))d(mS(t),s);else if(A.isObject(t)&&A.isSafeIterable(t)){let h=Object.create(null),p,m;for(const g of t){if(!A.isArray(g))throw new TypeError("Object iterator must return a key-value pair");m=g[0],A.hasOwnProp(h,m)?(p=h[m],h[m]=A.isArray(p)?[...p,g[1]]:[p,g[1]]):h[m]=g[1]}d(h,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=Fo(t),t){const o=A.findKey(this,t);if(o){const a=this[o];if(!s)return a;if(s===!0)return bS(a);if(A.isFunction(s))return s.call(this,a,o);if(A.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Fo(t),t){const o=A.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||ec(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let a=!1;function u(d){if(d=Fo(d),d){const h=A.findKey(o,d);h&&(!s||ec(o,o[h],h,s))&&(delete o[h],a=!0)}}return A.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let o=s.length,a=!1;for(;o--;){const u=s[o];(!t||ec(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,o={};return A.forEach(this,(a,u)=>{const d=A.findKey(o,u);if(d){s[d]=Ia(a),delete s[u];return}const h=t?SS(u):String(u).trim();h!==u&&delete s[u],s[h]=Ia(a),o[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return A.forEach(this,(o,a)=>{o!=null&&o!==!1&&(s[a]=t&&A.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[om]=this[om]={accessors:{}}).accessors,a=this.prototype;function u(d){const h=Fo(d);o[h]||(_S(a,d),o[h]=!0)}return A.isArray(t)?t.forEach(u):u(t),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(wt.prototype,({value:r},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[s]=o}}});A.freezeMethods(wt);const kS="[REDACTED ****]";function CS(r){if(A.hasOwnProp(r,"toJSON"))return!0;let t=Object.getPrototypeOf(r);for(;t&&t!==Object.prototype;){if(A.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function TS(r,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],a=u=>{if(u===null||typeof u!="object"||A.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof wt&&(u=u.toJSON()),o.push(u);let d;if(A.isArray(u))d=[],u.forEach((h,p)=>{const m=a(h);A.isUndefined(m)||(d[p]=m)});else{if(!A.isPlainObject(u)&&CS(u))return o.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const m=s.has(h.toLowerCase())?kS:a(p);A.isUndefined(m)||(d[h]=m)}}return o.pop(),d};return a(r)}let X=class Oy extends Error{static from(t,s,o,a,u,d){const h=new Oy(t.message,s||t.code,o,a,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,o,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&A.hasOwnProp(t,"redact")?t.redact:void 0,o=A.isArray(s)&&s.length>0?TS(t,s):A.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";X.ERR_BAD_OPTION="ERR_BAD_OPTION";X.ECONNABORTED="ECONNABORTED";X.ETIMEDOUT="ETIMEDOUT";X.ECONNREFUSED="ECONNREFUSED";X.ERR_NETWORK="ERR_NETWORK";X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";X.ERR_DEPRECATED="ERR_DEPRECATED";X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";X.ERR_BAD_REQUEST="ERR_BAD_REQUEST";X.ERR_CANCELED="ERR_CANCELED";X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";X.ERR_INVALID_URL="ERR_INVALID_URL";X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const RS=null,Ay=100;function Dc(r){return A.isPlainObject(r)||A.isArray(r)}function Ly(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function tc(r,t,s){return r?r.concat(t).map(function(a,u){return a=Ly(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function PS(r){return A.isArray(r)&&!r.some(Dc)}const NS=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function Ya(r,t,s){if(!A.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,s=A.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,P){return!A.isUndefined(P[j])});const o=s.metaTokens,a=s.visitor||F,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?Ay:s.maxDepth,m=h&&A.isSpecCompliantForm(t),g=[];if(!A.isFunction(a))throw new TypeError("visitor must be a function");function v(E){if(E===null)return"";if(A.isDate(E))return E.toISOString();if(A.isBoolean(E))return E.toString();if(!m&&A.isBlob(E))throw new X("Blob is not supported. Use a Buffer instead.");if(A.isArrayBuffer(E)||A.isTypedArray(E)){if(m&&typeof h=="function")return new h([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return E}function S(E){if(E>p)throw new X("Object is too deeply nested ("+E+" levels). Max depth: "+p,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function O(E,j){if(p===1/0)return JSON.stringify(E);const P=[];return JSON.stringify(E,function(W,$){if(!A.isObject($))return $;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push($),S(j+P.length-1),$})}function F(E,j,P){let L=E;if(A.isReactNative(t)&&A.isReactNativeBlob(E))return t.append(tc(P,j,u),v(E)),!1;if(E&&!P&&typeof E=="object"){if(A.endsWith(j,"{}"))j=o?j:j.slice(0,-2),E=O(E,1);else if(A.isArray(E)&&PS(E)||(A.isFileList(E)||A.endsWith(j,"[]"))&&(L=A.toArray(E)))return j=Ly(j),L.forEach(function($,G){!(A.isUndefined($)||$===null)&&t.append(d===!0?tc([j],G,u):d===null?j:j+"[]",v($))}),!1}return Dc(E)?!0:(t.append(tc(P,j,u),v(E)),!1)}const k=Object.assign(NS,{defaultVisitor:F,convertValue:v,isVisitable:Dc});function x(E,j,P=0){if(!A.isUndefined(E)){if(S(P),g.indexOf(E)!==-1)throw new Error("Circular reference detected in "+j.join("."));g.push(E),A.forEach(E,function(W,$){(!(A.isUndefined(W)||W===null)&&a.call(t,W,A.isString($)?$.trim():$,j,k))===!0&&x(W,j?j.concat($):[$],P+1)}),g.pop()}}if(!A.isObject(r))throw new TypeError("data must be an object");return x(r),t}function im(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(r).replace(/[!'()~]|%20/g,function(o){return t[o]})}function cd(r,t){this._pairs=[],r&&Ya(r,this,t)}const jy=cd.prototype;jy.append=function(t,s){this._pairs.push([t,s])};jy.toString=function(t){const s=t?o=>t.call(this,o,im):im;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function OS(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Dy(r,t,s){if(!t)return r;r=r||"";const o=A.isFunction(s)?{serialize:s}:s,a=A.getSafeProp(o,"encode")||OS,u=A.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=A.isURLSearchParams(t)?t.toString():new cd(t,o).toString(a),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class am{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(o){o!==null&&t(o)})}}const dd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},AS=typeof URLSearchParams<"u"?URLSearchParams:cd,LS=typeof FormData<"u"?FormData:null,jS=typeof Blob<"u"?Blob:null,DS={isBrowser:!0,classes:{URLSearchParams:AS,FormData:LS,Blob:jS},protocols:["http","https","file","blob","url","data"]},fd=typeof window<"u"&&typeof document<"u",Ic=typeof navigator=="object"&&navigator||void 0,IS=fd&&(!Ic||["ReactNative","NativeScript","NS"].indexOf(Ic.product)<0),FS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",US=fd&&window.location.href||"http://localhost",MS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fd,hasStandardBrowserEnv:IS,hasStandardBrowserWebWorkerEnv:FS,navigator:Ic,origin:US},Symbol.toStringTag,{value:"Module"})),ft={...MS,...DS};function zS(r,t){return Ya(r,new ft.classes.URLSearchParams,{visitor:function(s,o,a,u){return ft.isNode&&A.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const lm=Ay;function Iy(r){if(r>lm)throw new X("FormData field is too deeply nested ("+r+" levels). Max depth: "+lm,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function BS(r){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(r))!==null;)Iy(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function $S(r){const t={},s=Object.keys(r);let o;const a=s.length;let u;for(o=0;o=s.length;return d=!d&&A.isArray(a)?a.length:d,p?(A.hasOwnProp(a,d)?a[d]=A.isArray(a[d])?a[d].concat(o):[a[d],o]:a[d]=o,!h):((!A.hasOwnProp(a,d)||!A.isObject(a[d]))&&(a[d]=[]),t(s,o,a[d],u)&&A.isArray(a[d])&&(a[d]=$S(a[d])),!h)}if(A.isFormData(r)&&A.isFunction(r.entries)){const s={};return A.forEachEntry(r,(o,a)=>{t(BS(o),a,s,0)}),s}return null}const Rs=(r,t)=>r!=null&&A.hasOwnProp(r,t)?r[t]:void 0;function WS(r,t,s){if(A.isString(r))try{return(t||JSON.parse)(r),A.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(r)}const ci={transitional:dd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",a=o.indexOf("application/json")>-1,u=A.isObject(t);if(u&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return a?JSON.stringify(Fy(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=Rs(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return zS(t,p).toString();if((h=A.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=Rs(this,"env"),g=m&&m.FormData;return Ya(h?{"files[]":t}:t,g&&new g,p)}}return u||a?(s.setContentType("application/json",!1),WS(t)):t}],transformResponse:[function(t){const s=Rs(this,"transitional")||ci.transitional,o=s&&s.forcedJSONParsing,a=Rs(this,"responseType"),u=a==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(o&&!a||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,Rs(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?X.from(p,X.ERR_BAD_RESPONSE,this,null,Rs(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch","query"],r=>{ci.headers[r]={}});function nc(r,t){const s=this||ci,o=t||s,a=wt.from(o.headers);let u=o.data;return A.forEach(r,function(h){u=h.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function Uy(r){return!!(r&&r.__CANCEL__)}let di=class extends X{constructor(t,s,o){super(t??"canceled",X.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function My(r,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?r(s):t(new X("Request failed with status code "+s.status,s.status>=400&&s.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,s.config,s.request,s))}function VS(r){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(r);return t&&t[1]||""}function HS(r,t){r=r||10;const s=new Array(r),o=new Array(r);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),g=o[u];d||(d=m),s[a]=p,o[a]=m;let v=u,S=0;for(;v!==a;)S+=s[v++],v=v%r;if(a=(a+1)%r,a===u&&(u=(u+1)%r),m-d{s=g,a=null,u&&(clearTimeout(u),u=null),r(...m)};return[(...m)=>{const g=Date.now(),v=g-s;v>=o?d(m,g):(a=m,u||(u=setTimeout(()=>{u=null,d(a)},o-v)))},()=>a&&d(a)]}const qa=(r,t,s=3)=>{let o=0;const a=HS(50,250);return qS(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,m=Math.max(0,p-o),g=a(m);o=Math.max(o,p);const v={loaded:p,total:h,progress:h?p/h:void 0,bytes:m,rate:g||void 0,estimated:g&&h?(h-p)/g:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};r(v)},s)},um=(r,t)=>{const s=r!=null;return[o=>t[0]({lengthComputable:s,total:r,loaded:o}),t[1]]},cm=r=>(...t)=>A.asap(()=>r(...t)),QS=ft.hasStandardBrowserEnv?((r,t)=>s=>(s=new URL(s,ft.origin),r.protocol===s.protocol&&r.host===s.host&&(t||r.port===s.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,KS=ft.hasStandardBrowserEnv?{write(r,t,s,o,a,u,d){if(typeof document>"u")return;const h=[`${r}=${encodeURIComponent(t)}`];A.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),A.isString(o)&&h.push(`path=${o}`),A.isString(a)&&h.push(`domain=${a}`),u===!0&&h.push("secure"),A.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(r){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sr instanceof wt?{...r}:r;function es(r,t){r=r||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(g,v,S,O){return A.isPlainObject(g)&&A.isPlainObject(v)?A.merge.call({caseless:O},g,v):A.isPlainObject(v)?A.merge({},v):A.isArray(v)?v.slice():v}function a(g,v,S,O){if(A.isUndefined(v)){if(!A.isUndefined(g))return o(void 0,g,S,O)}else return o(g,v,S,O)}function u(g,v){if(!A.isUndefined(v))return o(void 0,v)}function d(g,v){if(A.isUndefined(v)){if(!A.isUndefined(g))return o(void 0,g)}else return o(void 0,v)}function h(g){const v=A.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!A.isUndefined(v))if(A.isPlainObject(v)){if(A.hasOwnProp(v,g))return v[g]}else return;const S=A.hasOwnProp(r,"transitional")?r.transitional:void 0;if(A.isPlainObject(S)&&A.hasOwnProp(S,g))return S[g]}function p(g,v,S){if(A.hasOwnProp(t,S))return o(g,v);if(A.hasOwnProp(r,S))return o(void 0,g)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(g,v,S)=>a(fm(g),fm(v),S,!0)};return A.forEach(Object.keys({...r,...t}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const S=A.hasOwnProp(m,v)?m[v]:a,O=A.hasOwnProp(r,v)?r[v]:void 0,F=A.hasOwnProp(t,v)?t[v]:void 0,k=S(O,F,v);A.isUndefined(k)&&S!==p||(s[v]=k)}),A.hasOwnProp(t,"validateStatus")&&A.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(A.hasOwnProp(r,"validateStatus")?s.validateStatus=o(void 0,r.validateStatus):delete s.validateStatus),s}const t_=["content-type","content-length"];function n_(r,t,s){if(s!=="content-only"){r.set(t);return}Object.entries(t||{}).forEach(([o,a])=>{t_.includes(o.toLowerCase())&&r.set(o,a)})}const r_=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function By(r){const t=es({},r),s=S=>A.hasOwnProp(t,S)?t[S]:void 0,o=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),m=s("baseURL"),g=s("allowAbsoluteUrls"),v=s("url");if(t.headers=h=wt.from(h),t.url=Dy(zy(m,v,g,t),s("params"),s("paramsSerializer")),p){const S=A.getSafeProp(p,"username")||"",O=A.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(S+":"+(O?r_(O):"")))}catch(F){throw X.from(F,X.ERR_BAD_OPTION_VALUE,r)}}if(A.isFormData(o)&&(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||A.isReactNative(o)?h.setContentType(void 0):A.isFunction(o.getHeaders)&&n_(h,o.getHeaders(),s("formDataHeaderPolicy"))),ft.hasStandardBrowserEnv&&(A.isFunction(a)&&(a=a(t)),a===!0||a==null&&QS(t.url))){const O=u&&d&&KS.read(d);O&&h.set(u,O)}return t}const s_=typeof XMLHttpRequest<"u",o_=s_&&function(r){return new Promise(function(s,o){const a=By(r);let u=a.data;const d=wt.from(a.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=a,g,v,S,O,F;function k(){O&&O(),F&&F(),a.cancelToken&&a.cancelToken.unsubscribe(g),a.signal&&a.signal.removeEventListener("abort",g)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function E(){if(!x)return;const P=wt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),W={data:!h||h==="text"||h==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:P,config:r,request:x};My(function(G){s(G),k()},function(G){o(G),k()},W),x=null}"onloadend"in x?x.onloadend=E:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(E)},x.onabort=function(){x&&(o(new X("Request aborted",X.ECONNABORTED,r,x)),k(),x=null)},x.onerror=function(L){const W=L&&L.message?L.message:"Network Error",$=new X(W,X.ERR_NETWORK,r,x);$.event=L||null,o($),k(),x=null},x.ontimeout=function(){let L=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const W=a.transitional||dd;a.timeoutErrorMessage&&(L=a.timeoutErrorMessage),o(new X(L,W.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,r,x)),k(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&A.forEach(Ny(d),function(L,W){x.setRequestHeader(W,L)}),A.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),h&&h!=="json"&&(x.responseType=a.responseType),m&&([S,F]=qa(m,!0),x.addEventListener("progress",S)),p&&x.upload&&([v,O]=qa(p),x.upload.addEventListener("progress",v),x.upload.addEventListener("loadend",O)),(a.cancelToken||a.signal)&&(g=P=>{x&&(o(!P||P.type?new di(null,r,x):P),x.abort(),k(),x=null)},a.cancelToken&&a.cancelToken.subscribe(g),a.signal&&(a.signal.aborted?g():a.signal.addEventListener("abort",g)));const j=VS(a.url);if(j&&!ft.protocols.includes(j)){o(new X("Unsupported protocol "+j+":",X.ERR_BAD_REQUEST,r)),k();return}x.send(u||null)})},i_=(r,t)=>{if(r=r?r.filter(Boolean):[],!t&&!r.length)return;const s=new AbortController;let o=!1;const a=function(p){if(!o){o=!0,d();const m=p instanceof Error?p:this.reason;s.abort(m instanceof X?m:new di(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new X(`timeout of ${t}ms exceeded`,X.ETIMEDOUT))},t);const d=()=>{r&&(u&&clearTimeout(u),u=null,r.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),r=null)};r.forEach(p=>p.addEventListener("abort",a,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>A.asap(d),h},a_=function*(r,t){let s=r.byteLength;if(s{const a=l_(r,t);let u=0,d,h=p=>{d||(d=!0,o&&o(p))};return new ReadableStream({async pull(p){try{const{done:m,value:g}=await a.next();if(m){h(),p.close();return}let v=g.byteLength;if(s){let S=u+=v;s(S)}p.enqueue(new Uint8Array(g))}catch(m){throw h(m),m}},cancel(p){return h(p),a.return()}},{highWaterMark:2})},Qa=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,c_=(r,t,s)=>t+2O>=2&&o.charCodeAt(O-2)===37&&o.charCodeAt(O-1)===51&&(o.charCodeAt(O)===68||o.charCodeAt(O)===100);m>=0&&(o.charCodeAt(m)===61?(p++,m--):g(m)&&(p++,m-=3)),p===1&&m>=0&&(o.charCodeAt(m)===61||g(m))&&p++;const S=Math.floor(d/4)*3-(p||0);return S>0?S:0}let u=0;for(let d=0,h=o.length;d=55296&&p<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const hd="1.18.1",pm=64*1024,{isFunction:Ra}=A,f_=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),mm=r=>{if(!A.isString(r))return r;try{return decodeURIComponent(r)}catch{return r}},gm=(r,...t)=>{try{return!!r(...t)}catch{return!1}},h_=r=>{const t=r.indexOf("://");let s=r;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},p_=r=>{const t=A.global!==void 0&&A.global!==null?A.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;r=A.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},r);const{fetch:a,Request:u,Response:d}=r,h=a?Ra(a):typeof fetch=="function",p=Ra(u),m=Ra(d);if(!h)return!1;const g=h&&Ra(s),v=h&&(typeof o=="function"?(E=>j=>E.encode(j))(new o):async E=>new Uint8Array(await new u(E).arrayBuffer())),S=p&&g&&gm(()=>{let E=!1;const j=new u(ft.origin,{body:new s,method:"POST",get duplex(){return E=!0,"half"}}),P=j.headers.has("Content-Type");return j.body!=null&&j.body.cancel(),E&&!P}),O=m&&g&&gm(()=>A.isReadableStream(new d("").body)),F={stream:O&&(E=>E.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!F[E]&&(F[E]=(j,P)=>{let L=j&&j[E];if(L)return L.call(j);throw new X(`Response type '${E}' is not supported`,X.ERR_NOT_SUPPORT,P)})});const k=async E=>{if(E==null)return 0;if(A.isBlob(E))return E.size;if(A.isSpecCompliantForm(E))return(await new u(ft.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(A.isArrayBufferView(E)||A.isArrayBuffer(E))return E.byteLength;if(A.isURLSearchParams(E)&&(E=E+""),A.isString(E))return(await v(E)).byteLength},x=async(E,j)=>{const P=A.toFiniteNumber(E.getContentLength());return P??k(j)};return async E=>{let{url:j,method:P,data:L,signal:W,cancelToken:$,timeout:G,onDownloadProgress:B,onUploadProgress:ie,responseType:ue,headers:be,withCredentials:Re="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:Se}=By(E);const Ee=A.isNumber(J)&&J>-1,_e=A.isNumber(Se)&&Se>-1,K=Y=>A.hasOwnProp(E,Y)?E[Y]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let M=i_([W,$&&$.toAbortSignal()],G),N=null;const z=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let ce,me=null;const he=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,E,N);try{let Y;const ve=K("auth");if(ve){const we=A.getSafeProp(ve,"username")||"",at=A.getSafeProp(ve,"password")||"";Y={username:we,password:at}}if(h_(j)){const we=new URL(j,ft.origin);if(!Y&&(we.username||we.password)){const at=mm(we.username),Yt=mm(we.password);Y={username:at,password:Yt}}(we.username||we.password)&&(we.username="",we.password="",j=we.href)}if(Y&&(be.delete("authorization"),be.set("Authorization","Basic "+btoa(f_((Y.username||"")+":"+(Y.password||""))))),Ee&&typeof j=="string"&&j.startsWith("data:")&&d_(j)>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,E,N);if(_e&&P!=="get"&&P!=="head"){const we=await k(L);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>Se))throw he()}const Te=_e&&(A.isReadableStream(L)||A.isStream(L)),ye=(we,at,Yt)=>hm(we,pm,Xt=>{if(_e&&Xt>Se)throw me=he();at&&at(Xt)},Yt);if(S&&P!=="get"&&P!=="head"&&(ie||Te)){if(ce=ce??await x(be,L),ce!==0||Te){let we=new u(j,{method:"POST",body:L,duplex:"half"}),at;if(A.isFormData(L)&&(at=we.headers.get("content-type"))&&be.setContentType(at),we.body){const[Yt,Xt]=ie&&um(ce,qa(cm(ie)))||[];L=ye(we.body,Yt,Xt)}}}else if(Te&&!p&&g&&P!=="get"&&P!=="head")L=ye(L);else if(Te&&p&&!S&&P!=="get"&&P!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,E,N);A.isString(Re)||(Re=Re?"include":"omit");const tt=p&&"credentials"in u.prototype;if(A.isFormData(L)){const we=be.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&be.delete("content-type")}be.set("User-Agent","axios/"+hd,!1);const Ft={...xe,signal:M,method:P.toUpperCase(),headers:Ny(be.normalize()),body:L,duplex:"half",credentials:tt?Re:void 0};N=p&&new u(j,Ft);let it=await(p?ae(N,xe):ae(j,Ft));const Gt=wt.from(it.headers);if(Ee){const we=A.toFiniteNumber(Gt.getContentLength());if(we!=null&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,E,N)}const Ut=O&&(ue==="stream"||ue==="response");if(O&&it.body&&(B||Ee||Ut&&z)){const we={};["status","statusText","headers"].forEach(En=>{we[En]=it[En]});const at=A.toFiniteNumber(Gt.getContentLength()),[Yt,Xt]=B&&um(at,qa(cm(B),!0))||[];let Fn=0;const Un=En=>{if(Ee&&(Fn=En,Fn>J))throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,E,N);Yt&&Yt(En)};it=new d(hm(it.body,pm,Un,()=>{Xt&&Xt(),z&&z()}),we)}ue=ue||"text";let Mt=await F[A.findKey(F,ue)||"text"](it,E);if(Ee&&!O&&!Ut){let we;if(Mt!=null&&(typeof Mt.byteLength=="number"?we=Mt.byteLength:typeof Mt.size=="number"?we=Mt.size:typeof Mt=="string"&&(we=typeof o=="function"?new o().encode(Mt).byteLength:Mt.length)),typeof we=="number"&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,E,N)}return!Ut&&z&&z(),await new Promise((we,at)=>{My(we,at,{data:Mt,headers:wt.from(it.headers),status:it.status,statusText:it.statusText,config:E,request:N})})}catch(Y){if(z&&z(),M&&M.aborted&&M.reason instanceof X){const ve=M.reason;throw ve.config=E,N&&(ve.request=N),Y!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:Y,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw N&&!me.request&&(me.request=N),me;if(Y instanceof X)throw N&&!Y.request&&(Y.request=N),Y;if(Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)){const ve=new X("Network Error",X.ERR_NETWORK,E,N,Y&&Y.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:Y.cause||Y,writable:!0,enumerable:!1,configurable:!0}),ve}throw X.from(Y,Y&&Y.code,E,N,Y&&Y.response)}}},m_=new Map,$y=r=>{let t=r&&r.env||{};const{fetch:s,Request:o,Response:a}=t,u=[o,a,s];let d=u.length,h=d,p,m,g=m_;for(;h--;)p=u[h],m=g.get(p),m===void 0&&g.set(p,m=h?new Map:p_(t)),g=m;return m};$y();const pd={http:RS,xhr:o_,fetch:{get:$y}};A.forEach(pd,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(r,"adapterName",{__proto__:null,value:t})}});const ym=r=>`- ${r}`,g_=r=>A.isFunction(r)||r===null||r===!1;function y_(r,t){r=A.isArray(r)?r:[r];const{length:s}=r;let o,a;const u={};for(let d=0;d`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(ym).join(` `):" "+ym(d[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+h,X.ERR_NOT_SUPPORT)}return a}const Wy={getAdapter:y_,adapters:pd};function rc(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new di(null,r)}function vm(r){return rc(r),r.headers=wt.from(r.headers),r.data=nc.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Wy.getAdapter(r.adapter||ci.adapter,r)(r).then(function(o){rc(r),r.response=o;try{o.data=nc.call(r,r.transformResponse,o)}finally{delete r.response}return o.headers=wt.from(o.headers),o},function(o){if(!Uy(o)&&(rc(r),o&&o.response)){r.response=o.response;try{o.response.data=nc.call(r,r.transformResponse,o.response)}finally{delete r.response}o.response.headers=wt.from(o.response.headers)}return Promise.reject(o)})}const Xa={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{Xa[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const wm={};Xa.transitional=function(t,s,o){function a(u,d){return"[Axios v"+hd+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,h)=>{if(t===!1)throw new X(a(d," has been removed"+(s?" in "+s:"")),X.ERR_DEPRECATED);return s&&!wm[d]&&(wm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Xa.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function v_(r,t,s){if(typeof r!="object"||r===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let a=o.length;for(;a-- >0;){const u=o[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=r[u],p=h===void 0||d(h,u,r);if(p!==!0)throw new X("option "+u+" must be "+p,X.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new X("Unknown option "+u,X.ERR_BAD_OPTION)}}const Fa={assertOptions:v_,validators:Xa},yt=Fa.validators;let Kr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new am,response:new am}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(o.stack).endsWith(p)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=es(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:u}=s;o!==void 0&&Fa.assertOptions(o,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean),legacyInterceptorReqResOrdering:yt.transitional(yt.boolean),advertiseZstdAcceptEncoding:yt.transitional(yt.boolean),validateStatusUndefinedResolves:yt.transitional(yt.boolean)},!1),a!=null&&(A.isFunction(a)?s.paramsSerializer={serialize:a}:Fa.assertOptions(a,{encode:yt.function,serialize:yt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Fa.assertOptions(s,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&A.merge(u.common,u[s.method]);u&&A.forEach(["delete","get","head","post","put","patch","query","common"],F=>{delete u[F]}),s.headers=wt.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(s)===!1)return;p=p&&k.synchronous;const x=s.transitional||dd;x&&x.legacyInterceptorReqResOrdering?h.unshift(k.fulfilled,k.rejected):h.push(k.fulfilled,k.rejected)});const m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let g,v=0,S;if(!p){const F=[vm.bind(this),void 0];for(F.unshift(...h),F.push(...m),S=F.length,g=Promise.resolve(s);v{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](a);o._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(h=>{o.subscribe(h),u=h}).then(a);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,h){o.reason||(o.reason=new di(u,d,h),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Vy(function(a){t=a}),cancel:t}}};function x_(r){return function(s){return r.apply(null,s)}}function b_(r){return A.isObject(r)&&r.isAxiosError===!0}const Fc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fc).forEach(([r,t])=>{Fc[t]=r});function Hy(r){const t=new Kr(r),s=by(Kr.prototype.request,t);return A.extend(s,Kr.prototype,t,{allOwnKeys:!0}),A.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Hy(es(r,a))},s}const Ke=Hy(ci);Ke.Axios=Kr;Ke.CanceledError=di;Ke.CancelToken=w_;Ke.isCancel=Uy;Ke.VERSION=hd;Ke.toFormData=Ya;Ke.AxiosError=X;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=x_;Ke.isAxiosError=b_;Ke.mergeConfig=es;Ke.AxiosHeaders=wt;Ke.formToJSON=r=>Fy(A.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=Wy.getAdapter;Ke.HttpStatusCode=Fc;Ke.default=Ke;const{Axios:UC,AxiosError:MC,CanceledError:zC,isCancel:BC,CancelToken:$C,VERSION:WC,all:VC,Cancel:HC,isAxiosError:qC,spread:QC,toFormData:KC,AxiosHeaders:GC,HttpStatusCode:YC,formToJSON:XC,getAdapter:JC,mergeConfig:ZC,create:eT}=Ke,qy=typeof window>"u",xm=!qy&&window.self!==window.top,E_=!qy&&typeof document>"u",sc=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ct=[];for(let r=0;r<256;++r)ct.push((r+256).toString(16).slice(1));function S_(r,t=0){return(ct[r[t+0]]+ct[r[t+1]]+ct[r[t+2]]+ct[r[t+3]]+"-"+ct[r[t+4]]+ct[r[t+5]]+"-"+ct[r[t+6]]+ct[r[t+7]]+"-"+ct[r[t+8]]+ct[r[t+9]]+"-"+ct[r[t+10]]+ct[r[t+11]]+ct[r[t+12]]+ct[r[t+13]]+ct[r[t+14]]+ct[r[t+15]]).toLowerCase()}let oc;const __=new Uint8Array(16);function k_(){if(!oc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");oc=crypto.getRandomValues.bind(crypto)}return oc(__)}const C_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bm={randomUUID:C_};function T_(r,t,s){var a;r=r||{};const o=r.random??((a=r.rng)==null?void 0:a.call(r))??k_();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,S_(o)}function R_(r,t,s){return bm.randomUUID&&!r?bm.randomUUID():T_(r)}const Uo=typeof window<"u"?window:{base44SharedInstances:{}};function P_(r,t){return Uo.base44SharedInstances||(Uo.base44SharedInstances={}),Uo.base44SharedInstances[r]||(Uo.base44SharedInstances[r]={instance:t()}),Uo.base44SharedInstances[r].instance}const N_="__user_heartbeat_event__",O_="__initialization_event__",A_="__session_duration_event__",Em="analytics-enable",Sm="base44_analytics_session_id",L_={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},j_="analytics",Fe=P_(j_,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...L_,...$_()}})),D_=({axiosClient:r,serverUrl:t,appId:s,userAuthModule:o})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:h}=Fe.config;if(!(!((a=Fe.config)===null||a===void 0)&&a.enabled)||E_)return{track:()=>{},cleanup:()=>{}};let p;const m=`${t}/api/apps/${s}/analytics/track/batch`,g=async P=>{await r.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:P}})},v=P=>{try{const L=JSON.stringify({events:P}),W=new Blob([L],{type:"application/json"});return typeof navigator>"u"||L.length>6e4||!navigator.sendBeacon(m,W)}catch{return!1}},S=async(P,L={})=>{if(P.length===0)return;const W=await B_(o),$=P.map(z_(W));try{(!L.isBeacon||!v($))&&await g($)}catch{}},O=()=>{km(S,{throttleTime:d,batchSize:h})},F=P=>{if(Fe.requestsQueue.length>=u)return;const L=M_();Fe.requestsQueue.push({...P,...L}),O()},k=()=>{km(S,{throttleTime:d,batchSize:h}),p=Cm(F),F_()},x=()=>{_m(),p==null||p(),U_(F);const P=Fe.requestsQueue.splice(0);S(P,{isBeacon:!0})},E=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&k())},j=()=>{_m(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",E)};return O(),p=Cm(F),I_(F),typeof window<"u"&&window.addEventListener("visibilitychange",E),{track:F,cleanup:j}};function _m(){Fe.isProcessing=!1}async function km(r,t){if(Fe.isProcessing)return;Fe.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;Fe.isProcessing&&Fe.requestsQueue.length>0;){const a=Fe.requestsQueue.splice(0,o);a.length&&await r(a),await new Promise(u=>setTimeout(u,s))}Fe.isProcessing=!1}function Cm(r){var t;if(Fe.isHeartBeatProcessing||((t=Fe.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Fe.isHeartBeatProcessing=!0;const s=setInterval(()=>{r({eventName:N_})},Fe.config.heartBeatInterval);return()=>{clearInterval(s),Fe.isHeartBeatProcessing=!1}}function I_(r){typeof window>"u"||Fe.wasInitializationTracked||(Fe.wasInitializationTracked=!0,r({eventName:O_,properties:{referrer:document==null?void 0:document.referrer}}))}function F_(){typeof window>"u"||Fe.sessionStartTime!==null||(Fe.sessionStartTime=new Date().toISOString())}function U_(r){if(typeof window>"u"||Fe.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Fe.sessionStartTime).getTime();Fe.sessionStartTime=null,r({eventName:A_,properties:{sessionDuration:t}})}function M_(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function z_(r){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...r})}let ic=null;async function B_(r){if(!Fe.sessionContext){if(!ic){const t=md();ic=r.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Fe.sessionContext=await ic}return Fe.sessionContext}function $_(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(Em);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(Em);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function md(){if(typeof window>"u")return sc();try{const r=localStorage.getItem(Sm);if(!r){const t=sc();return localStorage.setItem(Sm,t),t}return r}catch{return sc()}}class W_ extends Error{constructor(t,s,o,a,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Bo({baseURL:r,headers:t={},token:s,interceptResponses:o=!0,onError:a}){const u=Ke.create({baseURL:r,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",md()));const h=R_();if(d.requestId=h,xm)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:r+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{xm&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,m,g,v,S,O,F;const k=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((g=(m=d.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||d.message,x=new W_(k,(v=d.response)===null||v===void 0?void 0:v.status,(O=(S=d.response)===null||S===void 0?void 0:S.data)===null||O===void 0?void 0:O.code,(F=d.response)===null||F===void 0?void 0:F.data,d);return a==null||a(x),Promise.reject(x)}),u}function Tm(r){const{axios:t,appId:s,getSocket:o}=r;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return H_(t,s,u,o)}})}function V_(r){var t;try{const s=JSON.parse(r);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function H_(r,t,s,o){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const m={};return u&&(m.sort=u),d&&(m.limit=d),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),r.get(a,{params:m})},async filter(u,d,h,p,m){const g={q:JSON.stringify(u)};return d&&(g.sort=d),h&&(g.limit=h),p&&(g.skip=p),m&&(g.fields=Array.isArray(m)?m.join(","):m),r.get(a,{params:g})},async get(u){return r.get(`${a}/${u}`)},async create(u){return r.post(a,u)},async update(u,d){return r.put(`${a}/${u}`,d)},async delete(u){return r.delete(`${a}/${u}`)},async deleteMany(u){return r.delete(a,{data:u})},async bulkCreate(u){return r.post(`${a}/bulk`,u)},async updateMany(u,d){return r.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return r.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),r.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var g;const v=V_(m.data);if(v){v.type!=="delete"&&(!((g=v.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${v.id}")\` to fetch the full record.`);try{u(v)}catch(S){console.error("[Base44 SDK] Subscription callback error:",S)}}}})}}}function q_(r,t){return{async call(s,o,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=a??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await r.post(`/apps/${t}/integrations/custom/${s}/${o}`,p)}}}function Rm(r,t){const s=q_(r,t);return new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,m;return h instanceof FormData||h&&Object.values(h).some(g=>g instanceof File)?(p=new FormData,Object.keys(h).forEach(g=>{h[g]instanceof File?p.append(g,h[g],h[g].name):typeof h[g]=="object"&&h[g]!==null?p.append(g,JSON.stringify(h[g])):p.append(g,h[g])}),m="multipart/form-data"):(p=h,m="application/json"),a==="Core"?r.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":m}}):r.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":m}})}}})}})}function Q_(){return typeof window>"u"?!1:window!==window.parent}function K_(r,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(r,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",m),clearInterval(g),h.closed||h.close()},m=v=>{var S;if(v.origin!==s||v.source!==h||!(!((S=v.data)===null||S===void 0)&&S.access_token))return;p();const O=new URL(t),{access_token:F,is_new_user:k}=v.data;O.searchParams.set("access_token",F),k!=null&&O.searchParams.set("is_new_user",String(k)),window.location.href=O.toString()},g=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",m)}function G_(r,t,s,o){return{async me(){return r.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return r.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let p;a==="sso"?p=`/apps/${s}/auth/sso/login`:p=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${o.appBaseUrl}/api${p}?${h}`;if(Q_()){const g=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return K_(g,d,window.location.origin)}window.location.href=m},logout(a){if(delete r.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=a||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(r.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var h;try{const p=await r.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:m,user:g}=p;return m&&this.setToken(m),{access_token:m,user:g}}catch(p){throw((h=p.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return r.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return r.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return r.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return r.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return r.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return r.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return r.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function Y_(r,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return r.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return r.get(o)}}}function X_(r,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await r.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function J_(r,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await r.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Gr(r={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:a=!0}=r;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&Z_(u,{storageKey:t}),a){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function Z_(r,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!r)return!1;try{return window.localStorage.setItem(s,r),window.localStorage.setItem("token",r),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Pm(r,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,m])=>{m!=null&&d.set(p,String(m))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(h=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?h.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?h.append(m,JSON.stringify(d[m])):h.append(m,d[m])}),p="multipart/form-data"):(h=d,p="application/json"),r.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,m=a(d.headers),g={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,p),g)}}}function Nm({axios:r,getSocket:t,appId:s,serverUrl:o,token:a}){const u=`/apps/${s}/agents`,d={},h=()=>r.get(`${u}/conversations`),p=k=>r.get(`${u}/conversations/${k}`);return{getConversations:h,getConversation:p,listConversations:k=>r.get(`${u}/conversations`,{params:k}),createConversation:k=>r.post(`${u}/conversations`,k),addMessage:async(k,x)=>r.post(`${u}/conversations/v2/${k.id}/messages`,x),subscribeToConversation:(k,x)=>{const E=`/agent-conversations/${k}`,j=t(),P=p(k).then(L=>(d[k]=L,L));return j.subscribeToRoom(E,{connect:()=>{},update_model:async({data:L})=>{const W=JSON.parse(L);if(W._message){await P;const $=W._message,G=d[k];if(G){const B=G.messages||[],ie=B.findIndex(be=>be.id===$.id),ue=ie!==-1?B.map((be,Re)=>Re===ie?$:be):[...B,$];d[k]={...G,messages:ue},x==null||x(d[k])}}}})},getWhatsAppConnectURL:k=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/whatsapp`,E=a??Gr();return E?`${x}?token=${E}`:x},getTelegramConnectURL:k=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/telegram`,E=a??Gr();return E?`${x}?token=${E}`:x}}}function Om({serverUrl:r,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${r}/api/apps/${s}/ai/openai/v1`,token:(a=t??Gr())!==null&&a!==void 0?a:""}}}}function Am(r,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await r.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await r.get(s,{params:o})},async getStats(o={}){return await r.get(`${s}/stats`,{params:o})}}}function ek(r,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await r.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const xn=Object.create(null);xn.open="0";xn.close="1";xn.ping="2";xn.pong="3";xn.message="4";xn.upgrade="5";xn.noop="6";const Ua=Object.create(null);Object.keys(xn).forEach(r=>{Ua[xn[r]]=r});const Uc={type:"error",data:"parser error"},Qy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ky=typeof ArrayBuffer=="function",Gy=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,gd=({type:r,data:t},s,o)=>Qy&&t instanceof Blob?s?o(t):Lm(t,o):Ky&&(t instanceof ArrayBuffer||Gy(t))?s?o(t):Lm(new Blob([t]),o):o(xn[r]+(t||"")),Lm=(r,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(r)};function jm(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let ac;function tk(r,t){if(Qy&&r.data instanceof Blob)return r.data.arrayBuffer().then(jm).then(t);if(Ky&&(r.data instanceof ArrayBuffer||Gy(r.data)))return t(jm(r.data));gd(r,!1,s=>{ac||(ac=new TextEncoder),t(ac.encode(s))})}const Dm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$o=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r{let t=r.length*.75,s=r.length,o,a=0,u,d,h,p;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(o=0;o>4,g[a++]=(d&15)<<4|h>>2,g[a++]=(h&3)<<6|p&63;return m},rk=typeof ArrayBuffer=="function",yd=(r,t)=>{if(typeof r!="string")return{type:"message",data:Yy(r,t)};const s=r.charAt(0);return s==="b"?{type:"message",data:sk(r.substring(1),t)}:Ua[s]?r.length>1?{type:Ua[s],data:r.substring(1)}:{type:Ua[s]}:Uc},sk=(r,t)=>{if(rk){const s=nk(r);return Yy(s,t)}else return{base64:!0,data:r}},Yy=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}},Xy="",ok=(r,t)=>{const s=r.length,o=new Array(s);let a=0;r.forEach((u,d)=>{gd(u,!1,h=>{o[d]=h,++a===s&&t(o.join(Xy))})})},ik=(r,t)=>{const s=r.split(Xy),o=[];for(let a=0;a{const o=s.length;let a;if(o<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,o);else if(o<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}r.data&&typeof r.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let lc;function Pa(r){return r.reduce((t,s)=>t+s.length,0)}function Na(r,t){if(r[0].length===t)return r.shift();const s=new Uint8Array(t);let o=0;for(let a=0;aMath.pow(2,21)-1){h.enqueue(Uc);break}a=g*Math.pow(2,32)+m.getUint32(4),o=3}else{if(Pa(s)r){h.enqueue(Uc);break}}}})}const Jy=4;function Ye(r){if(r)return uk(r)}function uk(r){for(var t in Ye.prototype)r[t]=Ye.prototype[t];return r}Ye.prototype.on=Ye.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};Ye.prototype.once=function(r,t){function s(){this.off(r,s),t.apply(this,arguments)}return s.fn=t,this.on(r,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+r];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),ck="arraybuffer";function Zy(r,...t){return t.reduce((s,o)=>(r.hasOwnProperty(o)&&(s[o]=r[o]),s),{})}const dk=Kt.setTimeout,fk=Kt.clearTimeout;function Za(r,t){t.useNativeTimers?(r.setTimeoutFn=dk.bind(Kt),r.clearTimeoutFn=fk.bind(Kt)):(r.setTimeoutFn=Kt.setTimeout.bind(Kt),r.clearTimeoutFn=Kt.clearTimeout.bind(Kt))}const hk=1.33;function pk(r){return typeof r=="string"?mk(r):Math.ceil((r.byteLength||r.size)*hk)}function mk(r){let t=0,s=0;for(let o=0,a=r.length;o=57344?s+=3:(o++,s+=4);return s}function ev(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function gk(r){let t="";for(let s in r)r.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(r[s]));return t}function yk(r){let t={},s=r.split("&");for(let o=0,a=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};ik(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ok(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=ev()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let tv=!1;try{tv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xk=tv;function bk(){}class Ek extends wk{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class wn extends Ye{constructor(t,s,o){super(),this.createRequest=t,Za(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=Zy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var a;o.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=wn.requestsCount++,wn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=bk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wn.requestsCount=0;wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Im);else if(typeof addEventListener=="function"){const r="onpagehide"in Kt?"pagehide":"unload";addEventListener(r,Im,!1)}}function Im(){for(let r in wn.requests)wn.requests.hasOwnProperty(r)&&wn.requests[r].abort()}const Sk=(function(){const r=nv({xdomain:!1});return r&&r.responseType!==null})();class _k extends Ek{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=Sk&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new wn(nv,this.uri(),t)}}function nv(r){const t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||xk))return new XMLHttpRequest}catch{}if(!t)try{return new Kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const rv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kk extends vd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=rv?{}:Zy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}a&&Ja(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=ev()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const uc=Kt.WebSocket||Kt.MozWebSocket;class Ck extends kk{createSocket(t,s,o){return rv?new uc(t,s,o):s?new uc(t,s):new uc(t)}doWrite(t,s){this.ws.send(s)}}class Tk extends vd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=lk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),a=ak();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Ja(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Rk={websocket:Ck,webtransport:Tk,polling:_k},Pk=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Mc(r){if(r.length>8e3)throw"URI too long";const t=r,s=r.indexOf("["),o=r.indexOf("]");s!=-1&&o!=-1&&(r=r.substring(0,s)+r.substring(s,o).replace(/:/g,";")+r.substring(o,r.length));let a=Pk.exec(r||""),u={},d=14;for(;d--;)u[Nk[d]]=a[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=Ok(u,u.path),u.queryKey=Ak(u,u.query),u}function Ok(r,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function Ak(r,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,a,u){a&&(s[a]=u)}),s}const zc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ma=[];zc&&addEventListener("offline",()=>{Ma.forEach(r=>r())},!1);class wr extends Ye{constructor(t,s){if(super(),this.binaryType=ck,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Mc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Mc(s.host).host);Za(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const a=o.prototype.name;this.transports.push(a),this._transportsByName[a]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=yk(this.opts.query)),zc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ma.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Jy,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&wr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",wr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ja(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,a){if(typeof s=="function"&&(a=s,s=void 0),typeof o=="function"&&(a=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(wr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),zc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Ma.indexOf(this._offlineEventListener);o!==-1&&Ma.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}wr.protocol=Jy;class Lk extends wr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;wr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(g(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=s.name,this.emitReserved("upgradeError",S)}}))};function u(){o||(o=!0,g(),s.close(),s=null)}const d=v=>{const S=new Error("probe error: "+v);S.transport=s.name,u(),this.emitReserved("upgradeError",S)};function h(){d("transport closed")}function p(){d("socket closed")}function m(v){s&&v.name!==s.name&&u()}const g=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",m)};s.once("open",a),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;oRk[u]).filter(u=>!!u)),super(o?a:t,a)}};function Dk(r,t="",s){let o=r;s=s||typeof location<"u"&&location,r==null&&(r=s.protocol+"//"+s.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=s.protocol+r:r=s.host+r),/^(https?|wss?):\/\//.test(r)||(typeof s<"u"?r=s.protocol+"//"+r:r="https://"+r),o=Mc(r)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const Ik=typeof ArrayBuffer=="function",Fk=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,sv=Object.prototype.toString,Uk=typeof Blob=="function"||typeof Blob<"u"&&sv.call(Blob)==="[object BlobConstructor]",Mk=typeof File=="function"||typeof File<"u"&&sv.call(File)==="[object FileConstructor]";function wd(r){return Ik&&(r instanceof ArrayBuffer||Fk(r))||Uk&&r instanceof Blob||Mk&&r instanceof File}function za(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let s=0,o=r.length;s=0&&r.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(xd.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Oe.CONNECT:return Fm(s);case Oe.DISCONNECT:return s===void 0;case Oe.CONNECT_ERROR:return typeof s=="string"||Fm(s);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&$k.indexOf(s[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Vk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Bk(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Hk=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Fm(r){return Object.prototype.toString.call(r)==="[object Object]"}const qk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:xd,Encoder:Wk,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function ln(r,t,s){return r.on(t,s),function(){r.off(t,s)}}const Qk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ov extends Ye{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ln(t,"open",this.onopen.bind(this)),ln(t,"packet",this.onpacket.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,a,u;if(Qk.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Oe.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const g=this.ids++,v=s.pop();this._registerAckCallback(g,v),d.id=g}const h=(a=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||a===void 0?void 0:a.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const a=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,a)=>{const u=(d,h)=>d?a(d):o(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Oe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(t);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(t);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...a){o||(o=!0,s.packet({type:Oe.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&r.jitter<=1?r.jitter:0,this.attempts=0}Gs.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-s:r+s}return Math.min(r,this.max)|0};Gs.prototype.reset=function(){this.attempts=0};Gs.prototype.setMin=function(r){this.ms=r};Gs.prototype.setMax=function(r){this.max=r};Gs.prototype.setJitter=function(r){this.jitter=r};class Wc extends Ye{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Za(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Gs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||qk;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new jk(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const a=ln(s,"open",function(){o.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=ln(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ln(t,"ping",this.onping.bind(this)),ln(t,"data",this.ondata.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this)),ln(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ja(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new ov(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Mo={};function Ba(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};const s=Dk(r,t.path||"/socket.io"),o=s.source,a=s.id,u=s.path,d=Mo[a]&&u in Mo[a].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Wc(o,t):(Mo[a]||(Mo[a]=new Wc(o,t)),p=Mo[a]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign(Ba,{Manager:Wc,Socket:ov,io:Ba,connect:Ba});const Kk=250;function Um(r,t){var s;const o=(s=r.token)!==null&&s!==void 0?s:Gr(),a={app_id:r.appId,token:o};o||(a.anonymous_id=md());const u=Ba(r.serverUrl,{path:r.mountPath,transports:r.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function Gk({config:r}){let t={...r};const s={},o={},a={connect:async()=>{const E=[];Object.keys(s).forEach(j=>{const P=S(j);P.length!==0&&(m(j),P.forEach(({connect:L})=>{const W=async()=>L==null?void 0:L();E.push(W())}))}),await Promise.all(E)},update_model:async E=>{const P=S(E.room).map(L=>{var W;return(W=L.update_model)===null||W===void 0?void 0:W.call(L,E)});await Promise.all(P)},error:async E=>{console.error("error",E);const j=Object.values(s).flat().map(P=>{var L;return(L=P.error)===null||L===void 0?void 0:L.call(P,E)});await Promise.all(j)}};let u=Um(r,a);function d(){h()}function h(){F(),u&&u.disconnect()}function p(E){d(),t={...t,...E},u=Um(t,a)}function m(E){u.emit("join",E)}function g(E){u.emit("leave",E)}async function v(E,j){var P;const L=JSON.stringify(j);return(P=a.update_model)===null||P===void 0?void 0:P.call(a,{room:E,data:L})}function S(E){var j;return(j=s[E])!==null&&j!==void 0?j:[]}function O(E){const j=o[E];j&&(clearTimeout(j),delete o[E])}function F(){Object.keys(o).forEach(E=>{var j,P;clearTimeout(o[E]),delete o[E],((P=(j=s[E])===null||j===void 0?void 0:j.length)!==null&&P!==void 0?P:0)===0&&delete s[E]})}function k(E){O(E),o[E]=setTimeout(()=>{var j,P;delete o[E],!(((P=(j=s[E])===null||j===void 0?void 0:j.length)!==null&&P!==void 0?P:0)>0)&&(g(E),delete s[E])},Kk)}return{socket:u,subscribeToRoom:(E,j)=>{s[E]?O(E):(m(E),s[E]=[]),s[E].push(j);let P=!1;return()=>{var L,W;P||(P=!0,s[E]=(W=(L=s[E])===null||L===void 0?void 0:L.filter($=>$!==j))!==null&&W!==void 0?W:[],s[E].length===0&&k(E))}},updateConfig:p,updateModel:v,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var iv=class extends Event{constructor(t,s){super("error",s);je(this,"message");je(this,"error");this.message=t.message,this.error=t}},av=class extends Event{constructor(t=1e3,s="",o){super("close",o);je(this,"code");je(this,"reason");je(this,"wasClean",!0);this.code=t,this.reason=s}},cc={Event,ErrorEvent:iv,CloseEvent:av};function Yk(r,t){if(!r)throw new Error(t)}function Xk(r){return new r.constructor(r.type,r)}function Jk(r){return"data"in r?new MessageEvent(r.type,r):"code"in r||"reason"in r?new av(r.code||1999,r.reason||"unknown reason",r):"error"in r?new iv(r.error,r):new Event(r.type,r)}var Jm,Zk=typeof process<"u"&&typeof((Jm=process.versions)==null?void 0:Jm.node)<"u"&&typeof document>"u",Oa=Zk?Jk:Xk,Dr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Mm=!1,eC=class Ir extends EventTarget{constructor(s,o,a={}){super();je(this,"_ws");je(this,"_retryCount",-1);je(this,"_uptimeTimeout");je(this,"_connectTimeout");je(this,"_shouldReconnect",!0);je(this,"_connectLock",!1);je(this,"_binaryType","blob");je(this,"_closeCalled",!1);je(this,"_messageQueue",[]);je(this,"_url");je(this,"_protocols");je(this,"_options");je(this,"onclose",null);je(this,"onerror",null);je(this,"onmessage",null);je(this,"onopen",null);je(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=Dr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),Yk(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Oa(s))});je(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Oa(s))});je(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Oa(s)),this._connect()});je(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Oa(s))});this._url=s,this._protocols=o,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Ir.CONNECTING}get OPEN(){return Ir.OPEN}get CLOSING(){return Ir.CLOSING}get CLOSED(){return Ir.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,a)=>(typeof a=="string"?o+=a.length:a instanceof Blob?o+=a.size:o+=a.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Ir.CLOSED:Ir.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=Dr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Dr.reconnectionDelayGrowFactor,minReconnectionDelay:o=Dr.minReconnectionDelay,maxReconnectionDelay:a=Dr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Dr.maxRetries,connectionTimeout:o=Dr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Mm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Mm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(a=>{this._connectLock=!1,this._handleError(new cc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new cc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new cc.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var tC=r=>r[1]!==null&&r[1]!==void 0;function nC(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let r=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return r>0?(o=(r+o)%16|0,r=Math.floor(r/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function lv(r,t,s={}){const{host:o,path:a,protocol:u,room:d,party:h,query:p}=r;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const g=h??"main",v=a?`/${a}`:"",S=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),O=`${S}://${m}/${h?`parties/${h}`:"party"}/${d}${v}`,F=(x={})=>`${O}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(tC)])}`,k=typeof p=="function"?async()=>F(await p()):F(p);return{host:m,path:v,room:d,name:g,protocol:S,partyUrl:O,urlProvider:k}}var rC=class extends eC{constructor(t){const s=zm(t);super(s.urlProvider,s.protocols,s.socketOptions);je(this,"_pk");je(this,"_pkurl");je(this,"name");je(this,"room");je(this,"host");je(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=zm({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:a,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=o,this.name=a,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=lv(t,"http"),a=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(a,s)}};function zm(r){const{id:t,host:s,path:o,party:a,room:u,protocol:d,query:h,protocols:p,...m}=r,g=t||nC(),v=lv(r,"ws",{_pk:g});return{_pk:g,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:p,socketOptions:m,urlProvider:v.urlProvider}}const sC=1e3,oC=3e3;class iC{constructor(t,s,o,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new rC({host:o.host,party:t,room:s,id:this.id,query:()=>{const g=o.getAuthToken();return{app_id:o.appId,handler:t,...g?{token:g}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",g=>{m();let v;try{v=JSON.parse(g.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const O of this.listeners)O(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>oC){m(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},sC)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function aC(r,t,s,o){let a=null;return{connect(u){if(a)return a;const d=new iC(r,t,s,u,()=>{o.delete(d),a===d&&(a=null)});return a=d,o.add(d),d}}}function lC(r,t){return r&&!r.startsWith("/")?r:t??r}function uC(r){const t=new Set;return{module:new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"))return u=>aC(a,u,r,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function cC(r){var t,s,o;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:g,functionsVersion:v,headers:S}=r,O=typeof m=="string"?m:"",F={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let k=null;const x=()=>(k||(k=Gk({config:F})),k),E={...S,"X-App-Id":String(u)},j=v?{...E,"Base44-Functions-Version":v}:E,P=Bo({baseURL:`${a}/api`,headers:E,token:d,onError:g==null?void 0:g.onError}),L=Bo({baseURL:`${a}/api`,headers:j,token:d,interceptResponses:!1,onError:g==null?void 0:g.onError}),W={...E,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=Bo({baseURL:`${a}/api`,headers:W,token:h,onError:g==null?void 0:g.onError}),G=Bo({baseURL:`${a}/api`,headers:j,token:h,interceptResponses:!1}),B=G_(P,L,u,{appBaseUrl:O});if(typeof window<"u"){const xe=d||Gr();xe&&B.setToken(xe)}const ie=uC({appId:u,host:lC(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:v,getAuthToken:()=>d||Gr()}),ue={entities:Tm({axios:P,appId:u,getSocket:x}),integrations:Rm(P,u),connectors:J_(P,u),auth:B,functions:Pm(L,u,{getAuthHeaders:()=>{const xe={},J=d||Gr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=L.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Nm({axios:P,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Om({serverUrl:a,token:d,appId:u}),appLogs:Am(P,u),users:ek(P,u),analytics:D_({axiosClient:P,serverUrl:a,appId:u,userAuthModule:B}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),k&&k.disconnect()}},be={entities:Tm({axios:$,appId:u,getSocket:x}),integrations:Rm($,u),sso:Y_($,u),connectors:X_($,u),functions:Pm(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:Nm({axios:$,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Om({serverUrl:a,token:h,appId:u}),appLogs:Am($,u),cleanup:()=>{k&&k.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),k&&k.updateConfig({token:xe}),F.token=xe},getConfig(){return{serverUrl:a,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return be}}}const uv=typeof window>"u",dC=uv?{localStorage:new Map}:window,qo=dC.localStorage,fC=r=>r.replace(/([A-Z])/g,"_$1").toLowerCase(),Ps=(r,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(uv)return t;const o=`base44_${fC(r)}`,a=new URLSearchParams(window.location.search),u=a.get(r);if(s){a.delete(r);const h=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return qo.setItem(o,u),u;if(t)return qo.setItem(o,t),t;const d=qo.getItem(o);return d||null},hC=()=>(Ps("clear_access_token")==="true"&&(qo.removeItem("base44_access_token"),qo.removeItem("token")),{appId:Ps("app_id",{defaultValue:"6a7b55a2ecf91bc837db9b98"}),token:Ps("access_token",{removeFromUrl:!0}),fromUrl:Ps("from_url",{defaultValue:window.location.href}),functionsVersion:Ps("functions_version",{defaultValue:"prod"}),appBaseUrl:Ps("app_base_url",{defaultValue:void 0})}),Wo={...hC()},{appId:pC,token:mC,functionsVersion:gC,appBaseUrl:yC}=Wo,Vo=cC({appId:pC,token:mC,functionsVersion:gC,serverUrl:"",requiresAuth:!1,appBaseUrl:yC});function vC({}){var a;const t=qs().pathname.substring(1),{data:s,isFetched:o}=vb({queryKey:["user"],queryFn:async()=>{try{return{user:await Vo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return w.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:w.jsx("div",{className:"max-w-md w-full",children:w.jsxs("div",{className:"text-center space-y-6",children:[w.jsxs("div",{className:"space-y-2",children:[w.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),w.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),w.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",w.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&w.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:w.jsxs("div",{className:"flex items-start space-x-3",children:[w.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:w.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),w.jsxs("div",{className:"text-left space-y-1",children:[w.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),w.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),w.jsx("div",{className:"pt-6",children:w.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[w.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const cv=_.createContext(),wC=({children:r})=>{const[t,s]=_.useState(null),[o,a]=_.useState(!1),[u,d]=_.useState(!0),[h,p]=_.useState(!0),[m,g]=_.useState(null),[v,S]=_.useState(!1),[O,F]=_.useState(null);_.useEffect(()=>{k()},[]);const k=async()=>{var P,L;try{p(!0),g(null);const W=Bo({baseURL:"/api/apps/public",headers:{"X-App-Id":Wo.appId},token:Wo.token,interceptResponses:!0});try{const $=await W.get(`/prod/public-settings/by-id/${Wo.appId}`);F($),Wo.token?await x():(d(!1),a(!1),S(!0)),p(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((L=(P=$.data)==null?void 0:P.extra_data)!=null&&L.reason)){const G=$.data.extra_data.reason;g(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else g({type:"unknown",message:$.message||"Failed to load app"});p(!1),d(!1)}}catch(W){console.error("Unexpected error:",W),g({type:"unknown",message:W.message||"An unexpected error occurred"}),p(!1),d(!1)}},x=async()=>{try{d(!0);const P=await Vo.auth.me();s(P),a(!0),d(!1),S(!0)}catch(P){console.error("User auth check failed:",P),d(!1),a(!1),S(!0),(P.status===401||P.status===403)&&g({type:"auth_required",message:"Authentication required"})}},E=(P=!0)=>{s(null),a(!1),P?Vo.auth.logout(window.location.href):Vo.auth.logout()},j=()=>{Vo.auth.redirectToLogin(window.location.href)};return w.jsx(cv.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:h,authError:m,appPublicSettings:O,authChecked:v,logout:E,navigateToLogin:j,checkUserAuth:x,checkAppState:k},children:r})},xC=()=>{const r=_.useContext(cv);if(!r)throw new Error("useAuth must be used within an AuthProvider");return r},bC=()=>w.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:w.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:w.jsxs("div",{className:"text-center",children:[w.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:w.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),w.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),w.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[w.jsx("p",{children:"If you believe this is an error, you can:"}),w.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[w.jsx("li",{children:"Verify you are logged in with the correct account"}),w.jsx("li",{children:"Contact the app administrator for access"}),w.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),EC=r=>{const t=r.slice(1);try{return decodeURIComponent(t)}catch{return t}};function SC(){const{pathname:r,hash:t}=qs(),s=Gb();return _.useEffect(()=>{if(s!=="POP"){if(t){const o=EC(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[r,t,s]),null}const Bm=[{label:"About",href:"/about"},{label:"Our Business",href:"/business"},{label:"Our Portfolio",href:"/portfolio"},{label:"Sustainability",href:"/sustainability"},{label:"Investor / Corporate Information",href:"/investor"},{label:"News / Insights",href:"/news"}];function _C(){const[r,t]=_.useState(!1);return w.jsx("header",{className:"alrazah-no-print sticky top-0 z-50 bg-white border-b border-[#E5E1DE]",children:w.jsxs("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16",children:[w.jsxs("div",{className:"flex h-[72px] lg:h-[92px] items-center justify-between gap-8",children:[w.jsxs(un,{to:"/",className:"alrazah-focus flex items-center gap-3 shrink-0","aria-label":"Alrazah Holding Company — Home",children:[w.jsx("span",{className:"flex h-9 w-9 items-center justify-center bg-[#8D0034] text-white font-semibold text-[15px] tracking-tight rounded-[2px]",children:"A"}),w.jsxs("span",{className:"flex flex-col leading-none",children:[w.jsx("span",{className:"text-[17px] font-semibold tracking-[0.16em] text-[#171717]",children:"ALRAZAH"}),w.jsx("span",{className:"mt-1 text-[10px] font-medium uppercase tracking-[0.22em] text-[#777777]",children:"Holding Company"})]})]}),w.jsx("nav",{className:"hidden xl:flex items-center gap-7","aria-label":"Primary",children:Bm.map(s=>w.jsx(un,{to:s.href,className:"alrazah-focus text-[13.5px] font-medium text-[#272727] hover:text-[#8D0034] transition-colors duration-200",children:s.label},s.label))}),w.jsxs("div",{className:"hidden xl:flex items-center gap-1",children:[w.jsx("button",{className:"alrazah-focus inline-flex h-10 w-10 items-center justify-center text-[#565656] hover:text-[#8D0034] transition-colors","aria-label":"Search",children:w.jsx(zx,{className:"h-[18px] w-[18px]",strokeWidth:1.5})}),w.jsxs("button",{className:"alrazah-focus inline-flex items-center gap-1 px-3 h-10 text-[13px] font-medium text-[#272727] hover:text-[#8D0034] transition-colors","aria-label":"Switch language",children:[w.jsx(jx,{className:"h-[18px] w-[18px]",strokeWidth:1.5}),w.jsx("span",{children:"EN"}),w.jsx(Og,{className:"h-3.5 w-3.5",strokeWidth:1.5})]}),w.jsx(un,{to:"/contact",className:"alrazah-focus ml-2 inline-flex h-10 items-center px-5 text-[13px] font-semibold text-white bg-[#8D0034] hover:bg-[#650025] transition-colors duration-200 rounded-[2px]",children:"Contact"})]}),w.jsx("button",{className:"alrazah-focus xl:hidden inline-flex h-10 w-10 items-center justify-center text-[#171717]",onClick:()=>t(s=>!s),"aria-label":"Toggle menu","aria-expanded":r,children:r?w.jsx(Ag,{className:"h-6 w-6",strokeWidth:1.5}):w.jsx(Ix,{className:"h-6 w-6",strokeWidth:1.5})})]}),r&&w.jsx("nav",{className:"xl:hidden border-t border-[#ECE8E5] py-4","aria-label":"Mobile",children:w.jsxs("div",{className:"flex flex-col gap-1",children:[Bm.map(s=>w.jsx(un,{to:s.href,onClick:()=>t(!1),className:"alrazah-focus py-2.5 text-[15px] font-medium text-[#272727] hover:text-[#8D0034]",children:s.label},s.label)),w.jsx(un,{to:"/contact",onClick:()=>t(!1),className:"mt-2 inline-flex h-11 items-center justify-center px-5 text-[14px] font-semibold text-white bg-[#8D0034] rounded-[2px]",children:"Contact"})]})})]})})}const kC=[{label:"Privacy Policy",href:"/legal/privacy-policy",active:!1},{label:"Terms of Use",href:"/legal/terms-of-use",active:!0},{label:"Cookie Policy",href:"/legal/cookie-policy",active:!1},{label:"Disclosures",href:"/legal/disclosures",active:!1}];function CC(){return w.jsx("div",{className:"alrazah-no-print border-b border-[#E5E1DE] bg-[#F4F2EF]",children:w.jsx("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16",children:w.jsxs("div",{className:"flex h-[52px] items-center justify-between gap-6",children:[w.jsx("span",{className:"hidden sm:block text-[11px] font-semibold uppercase tracking-[0.18em] text-[#565656]",children:"Legal & Corporate Information"}),w.jsx("nav",{className:"flex items-center gap-5 sm:gap-7 overflow-x-auto","aria-label":"Legal documents",children:kC.map(r=>w.jsxs(un,{to:r.href,className:`alrazah-focus relative whitespace-nowrap text-[13px] font-medium transition-colors duration-200 ${r.active?"text-[#171717]":"text-[#565656] hover:text-[#8D0034]"}`,children:[r.label,r.active&&w.jsx("span",{className:"absolute -bottom-[18px] left-0 right-0 h-[3px] bg-[#8D0034]"})]},r.label))})]})})})}const TC=[{heading:"ALRAZAH",links:["About Alrazah","Leadership","Governance","Sustainability"]},{heading:"OUR BUSINESS",links:["Real Estate","Asset Management","Logistics & Industrial","Project Management"]},{heading:"OUR PORTFOLIO",links:["Portfolio Overview","Projects","Completed Projects","Projects Under Development","Pipeline"]},{heading:"CORPORATE",links:["News","Reports","Contact","Careers"]},{heading:"LEGAL",links:["Privacy Policy","Terms of Use","Cookie Policy","Disclosures"]}],RC=["Privacy","Terms","Cookies","Accessibility"];function PC(){return w.jsxs("footer",{className:"alrazah-no-print bg-[#4F001D] text-white",children:[w.jsxs("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-16 lg:py-20",children:[w.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-10 lg:gap-8",children:[w.jsxs("div",{className:"col-span-2 lg:col-span-1",children:[w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsx("span",{className:"flex h-9 w-9 items-center justify-center bg-white text-[#8D0034] font-semibold text-[15px] tracking-tight rounded-[2px]",children:"A"}),w.jsxs("span",{className:"flex flex-col leading-none",children:[w.jsx("span",{className:"text-[15px] font-semibold tracking-[0.16em]",children:"ALRAZAH"}),w.jsx("span",{className:"mt-1 text-[9px] font-medium uppercase tracking-[0.22em] text-white/60",children:"Holding Company"})]})]}),w.jsx("p",{className:"mt-6 text-[13px] leading-[1.7] text-white/70 max-w-[260px]",children:"Alrazah Holding Company is a Qatari corporate institution managing real estate, asset management and industrial interests across the region."})]}),TC.map(r=>w.jsxs("div",{children:[w.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-white/55",children:r.heading}),w.jsx("ul",{className:"mt-4 space-y-2.5",children:r.links.map(t=>w.jsx("li",{children:w.jsx("a",{href:"#",className:"alrazah-focus text-[13.5px] text-white/85 hover:text-white transition-colors duration-200",children:t})},t))})]},r.heading))]}),w.jsx("div",{className:"mt-14 pt-8 border-t border-white/15",children:w.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[w.jsxs("div",{children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Registered Office"}),w.jsxs("p",{className:"mt-3 text-[13.5px] leading-[1.7] text-white/80",children:["Alrazah Holding Company",w.jsx("br",{}),"[Registered corporate address]",w.jsx("br",{}),"Doha, State of Qatar"]})]}),w.jsxs("div",{children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Telephone"}),w.jsx("p",{className:"mt-3 text-[13.5px] leading-[1.7] text-white/80",children:"[+974 XXXX XXXX]"})]}),w.jsxs("div",{children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-white/55",children:"Email"}),w.jsx("p",{className:"mt-3 text-[13.5px] leading-[1.7] text-white/80",children:"[corporate@qprimeholding.com]"})]})]})})]}),w.jsx("div",{className:"border-t border-white/15",children:w.jsxs("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-6 flex flex-col sm:flex-row items-center justify-between gap-4",children:[w.jsx("p",{className:"text-[12.5px] text-white/70 order-2 sm:order-1",children:"© 2026 Alrazah Holding Company. All rights reserved."}),w.jsxs("div",{className:"flex items-center gap-6 order-1 sm:order-2",children:[RC.map(r=>w.jsx("a",{href:"#",className:"alrazah-focus text-[12.5px] text-white/75 hover:text-white transition-colors",children:r},r)),w.jsx("span",{className:"h-3 w-px bg-white/25"}),w.jsx("button",{className:"alrazah-focus text-[12.5px] font-medium text-white hover:text-white transition-colors","aria-label":"Switch to Arabic",children:"العربية"})]})]})})]})}const dv=[{id:"introduction",number:"01",title:"Introduction",body:["Welcome to the digital channels of Alrazah Holding Company (“Alrazah”, “we”, “us” or “our”). These Terms of Use (these “Terms”) govern access to, and use of, the Alrazah corporate website, together with any associated digital resources, tools and content made available through it (collectively, the “Website”).","These Terms establish the conditions under which the Website and its content may be accessed and used. They are intended to protect the integrity of Alrazah's corporate information, the rights of Alrazah and its affiliated entities, and the legitimate expectations of visitors to the Website.","Please read these Terms carefully before accessing or using the Website. By accessing, browsing or otherwise using the Website, you acknowledge that you have read, understood and agree to be bound by these Terms in full. If you do not agree to be bound by these Terms, you should refrain from accessing or using the Website."]},{id:"acceptance-of-terms",number:"02",title:"Acceptance of Terms",body:["Your access to and use of the Website constitutes your acceptance of these Terms. This acceptance takes effect from the moment you first access the Website and continues for as long as you use it.","If you access the Website on behalf of an organisation, you represent and warrant that you are authorised to accept these Terms on behalf of that organisation, and that the organisation will be bound by these Terms accordingly.","Alrazah may, at its sole discretion, require certain services or content available through the Website to be subject to additional terms and conditions. Where such additional terms apply, they are read together with these Terms and, in the event of any conflict, the additional terms prevail in respect of the relevant service or content."]},{id:"definitions",number:"03",title:"Definitions",body:["In these Terms, unless the context otherwise requires:",{list:[{label:"“Affiliate”",text:"means any entity that controls, is controlled by, or is under common control with Alrazah Holding Company;"},{label:"“Content”",text:"means all text, graphics, logos, images, documents, data, software and other materials made available through the Website;"},{label:"“User”",text:"or “you” means any individual or entity who accesses or uses the Website;"},{label:"“Alrazah Group”",text:"means Alrazah Holding Company together with its subsidiaries and affiliates; and"},{label:"“Jurisdiction”",text:"means the State of Qatar, unless otherwise indicated."}]},"References to singular include the plural and vice versa, and references to any statute include any modification or re-enactment of it."]},{id:"use-of-the-website",number:"04",title:"Use of the Website",intro:"Alrazah grants you a non-exclusive, non-transferable, revocable and limited right to access and use the Website for lawful, informational and non-commercial purposes, subject to these Terms.",subsections:[{number:"4.1",title:"Permitted Use",body:"You may access, browse and view the Content made available on the Website for your own informational purposes, and you may download or print single copies of Content solely for your personal, non-commercial internal use, provided that all proprietary notices are retained."},{number:"4.2",title:"Prohibited Use",body:"You must not, without limitation:",list:["(a) use the Website in any manner that breaches applicable laws or regulations;","(b) attempt to gain unauthorised access to any part of the Website, its systems or networks;","(c) introduce or attempt to introduce viruses, malware or other harmful code;","(d) interfere with, disrupt or place an unreasonable load on the Website or its infrastructure;","(e) scrape, mine, copy or systematically extract Content without Alrazah's prior written consent;","(f) use the Website to impersonate another person or entity; or","(g) use automated means, including robots, crawlers or spiders, to access the Website except as permitted by applicable standards and Alrazah's instructions."]},{number:"4.3",title:"Restrictions",body:"Any right to access and use the Website is personal to you and may not be assigned, sublicensed or otherwise transferred to any third party without Alrazah's prior written consent."}]},{id:"prohibited-activities",number:"05",title:"Prohibited Activities",body:["Without limiting Section 4, you must not use the Website to publish, transmit or facilitate any material that is unlawful, defamatory, misleading, infringing of third-party rights, or otherwise objectionable. You must not use the Website in any manner that could damage, disable, overburden or impair the Website, or interfere with any other party's use of it.","Alrazah reserves the right to suspend or restrict access to the Website where it considers, in its sole discretion, that a User has breached these Terms or otherwise acted in a manner inconsistent with the intended use of the Website."]},{id:"intellectual-property",number:"06",title:"Intellectual Property",body:["All Content and all trademarks, trade names, service marks, logos, designs, text, graphics, photographs, documents, software and other proprietary materials appearing on the Website are owned by, or licensed to, Alrazah or members of the Alrazah Group, and are protected by applicable intellectual-property laws, including the laws of the State of Qatar.","Nothing in these Terms should be construed as granting, by implication, estoppel or otherwise, any licence or right to use any trademark, logo or other proprietary marking of Alrazah or any member of the Alrazah Group, except as expressly stated in these Terms.","Unauthorised use, reproduction, modification, distribution or exploitation of any Content may give rise to civil and criminal liability. Where you wish to request permission to use any Content beyond the limited right granted under these Terms, you should contact Alrazah using the contact details provided in Section 18."],notice:{title:"Important information",body:"Trademarks, logos and proprietary materials displayed on the Website are the property of Alrazah or its licensors. Any unauthorised use of these assets may constitute a breach of intellectual-property law and is strictly prohibited."}},{id:"website-content",number:"07",title:"Website Content",body:["The Content is provided for general informational purposes only. It does not constitute, and should not be relied upon as, investment, legal, tax, accounting or other professional advice. The Content may be updated, amended or withdrawn at any time without notice.","While Alrazah seeks to ensure that the Content is accurate and current at the time of publication, it does not warrant, represent or guarantee the accuracy, completeness, reliability, timeliness or fitness for purpose of any Content. You should obtain appropriate professional advice before taking, or refraining from taking, any action on the basis of any Content."]},{id:"third-party-content",number:"08",title:"Third-Party Websites and Content",body:["The Website may contain links to, or references to, websites, services, tools or content operated by third parties. These links are provided for convenience only and do not signify that Alrazah endorses, accepts responsibility for, or warrants the accuracy of, the third-party website or its content.","Alrazah has no control over the content of third-party websites and accepts no liability for any loss or damage arising from your use of, or reliance on, any third-party website. You access third-party websites entirely at your own risk and subject to the terms and conditions applicable to those websites."]},{id:"availability-and-security",number:"09",title:"Availability and Security",body:["Alrazah does not guarantee that the Website will be uninterrupted, error-free, secure or available at all times. The Website may be subject to interruption, maintenance, suspension, restriction or discontinuance, in whole or in part, without notice.","While Alrazah implements reasonable security measures, no method of transmission over the internet and no method of electronic storage is fully secure. Alrazah does not warrant that the Website is free of viruses or other harmful components. You are responsible for implementing appropriate safeguards to protect your own systems and data."]},{id:"disclaimers",number:"10",title:"Disclaimers",body:["To the fullest extent permitted by applicable law, the Website and all Content are provided on an “as is” and “as available” basis. Alrazah, on behalf of itself and the Alrazah Group, expressly disclaims all warranties and conditions of any kind, whether express, implied, statutory or otherwise, including any implied warranties of merchantability, fitness for a particular purpose, title and non-infringement.","Alrazah does not warrant that the Website will meet your requirements, that it will operate without interruption or error, or that defects will be corrected. Any reliance on the Website and its Content is at your own risk."]},{id:"limitation-of-liability",number:"11",title:"Limitation of Liability",body:["To the fullest extent permitted by applicable law, neither Alrazah nor any member of the Alrazah Group, nor any of their respective directors, officers, employees or agents, shall be liable to you for any direct, indirect, incidental, consequential, special, exemplary or punitive damages, or for any loss of profits, revenue, business, goodwill, data or anticipated savings, arising out of or in connection with your access to, or use of, the Website.","Nothing in these Terms is intended to exclude or limit any liability that cannot be excluded or limited under the laws of the State of Qatar or any other applicable jurisdiction."]},{id:"indemnification",number:"12",title:"Indemnification",body:["You agree to indemnify, defend and hold harmless Alrazah and the members of the Alrazah Group, together with their respective directors, officers, employees and agents, from and against any and all claims, liabilities, damages, losses and expenses (including reasonable legal costs) arising out of or in connection with your breach of these Terms, your misuse of the Website, or your violation of any law or the rights of any third party."]},{id:"privacy",number:"13",title:"Privacy",body:["Alrazah's collection, use and disclosure of personal information in connection with the Website is governed by its Privacy Policy, which is available at the Privacy Policy page. Your use of the Website is also governed by the Privacy Policy, which is incorporated into these Terms by reference.","By using the Website, you consent to the collection, use and disclosure of your personal information in accordance with the Privacy Policy."]},{id:"changes-to-these-terms",number:"14",title:"Changes to These Terms",body:["Alrazah may revise these Terms at any time by updating this page. The “Last updated” date displayed on this page indicates when the Terms were last revised. You are bound by the version of the Terms in effect at the time of your access to the Website.","You are encouraged to review these Terms periodically to stay informed of any updates. Continued use of the Website following the posting of revised Terms constitutes your acceptance of the revised Terms."]},{id:"governing-law",number:"15",title:"Governing Law and Jurisdiction",body:["These Terms, and any dispute arising out of or in connection with them, are governed by and construed in accordance with the laws of the State of Qatar.","Subject to applicable mandatory provisions of law, the courts of the State of Qatar shall have exclusive jurisdiction to settle any dispute or claim arising out of or in connection with these Terms or your use of the Website."],notice:{title:"Important information",body:"The governing law and jurisdiction set out in this Section reflect the corporate and regulatory framework of the State of Qatar. Any dispute concerning these Terms should be addressed through the official contact channels provided below before any formal proceedings are contemplated."}},{id:"severability",number:"16",title:"Severability",body:["If any provision of these Terms is held to be invalid, illegal or unenforceable by a court or other competent authority, that provision shall be deemed modified to the minimum extent necessary to make it valid, lawful and enforceable. The remaining provisions of these Terms shall continue in full force and effect."]},{id:"entire-agreement",number:"17",title:"Entire Agreement",body:["These Terms, together with any additional terms incorporated by reference (including the Privacy Policy), constitute the entire agreement between you and Alrazah in relation to your use of the Website and supersede all prior or contemporaneous understandings, communications and agreements, whether written or oral."]},{id:"contact-information",number:"18",title:"Contact Information",body:["If you have any questions, comments or requests regarding these Terms, or if you wish to seek permission to use any Content, please contact Alrazah using the official corporate contact channels provided at the end of this page.","Communications relating to legal matters should be directed to the corporate office of Alrazah Holding Company, Doha, State of Qatar."]}],Aa=dv.map(r=>({id:r.id,number:r.number,title:r.title})),NC=[{title:"Privacy Policy",desc:"How Alrazah handles information collected through its digital channels.",href:"/legal/privacy-policy"},{title:"Cookie Policy",desc:"Information regarding cookies and related technologies.",href:"/legal/cookie-policy"},{title:"Corporate Disclosures",desc:"Access corporate and regulatory information.",href:"/legal/disclosures"}];function OC(){var m;const[r,t]=_.useState((m=Aa[0])==null?void 0:m.id),[s,o]=_.useState(0),[a,u]=_.useState(!1),d=_.useRef(null);_.useEffect(()=>{const g=new IntersectionObserver(v=>{const S=v.filter(O=>O.isIntersecting).sort((O,F)=>O.boundingClientRect.top-F.boundingClientRect.top);S[0]&&t(S[0].target.id)},{rootMargin:"-140px 0px -70% 0px",threshold:0});return Aa.forEach(v=>{const S=document.getElementById(v.id);S&&g.observe(S)}),()=>g.disconnect()},[]),_.useEffect(()=>{const g=()=>{const v=document.documentElement,S=v.scrollTop||document.body.scrollTop,O=v.scrollHeight-v.clientHeight;o(O>0?Math.min(S/O*100,100):0)};return window.addEventListener("scroll",g,{passive:!0}),g(),()=>window.removeEventListener("scroll",g)},[]);const h=(g,v)=>{g.preventDefault();const S=document.getElementById(v);if(S){const O=S.getBoundingClientRect().top+window.scrollY-140;window.scrollTo({top:O,behavior:"smooth"}),t(v),u(!1)}},p=()=>window.print();return w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"alrazah-scroll-progress alrazah-no-print",style:{width:`${s}%`}}),w.jsx(_C,{}),w.jsx(CC,{}),w.jsx("div",{className:"alrazah-no-print bg-[#FAF9F7] border-b border-[#ECE8E5]",children:w.jsx("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16",children:w.jsxs("nav",{className:"flex items-center gap-2 py-4 text-[12px] font-medium uppercase tracking-[0.12em]","aria-label":"Breadcrumb",children:[w.jsx(un,{to:"/",className:"text-[#777777] hover:text-[#8D0034] transition-colors",children:"Home"}),w.jsx(Np,{className:"h-3.5 w-3.5 text-[#A9A5A2]",strokeWidth:1.5}),w.jsx("span",{className:"text-[#777777]",children:"Legal"}),w.jsx(Np,{className:"h-3.5 w-3.5 text-[#A9A5A2]",strokeWidth:1.5}),w.jsx("span",{className:"text-[#171717]",children:"Terms of Use"})]})})}),w.jsxs("section",{className:"relative overflow-hidden bg-[#650025] text-white",children:[w.jsx("span",{className:"alrazah-watermark absolute -right-10 top-1/2 -translate-y-1/2 text-[180px] lg:text-[280px] leading-none text-white","aria-hidden":"true",children:"ALRAZAH"}),w.jsx("div",{className:"relative mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-16 lg:py-24",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12",children:[w.jsxs("div",{className:"lg:col-span-8",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-white/65",children:"Legal & Corporate Information"}),w.jsx("h1",{className:"mt-5 text-[40px] sm:text-[48px] lg:text-[56px] font-semibold leading-[1.06] tracking-[-0.01em]",children:"Terms of Use"}),w.jsx("p",{className:"mt-6 max-w-[560px] text-[16px] lg:text-[17px] leading-[1.7] text-white/80",children:"These terms govern access to and use of the Alrazah website and establish the conditions under which its content, services and digital resources may be accessed and used."})]}),w.jsx("div",{className:"lg:col-span-4 lg:pl-8 lg:border-l lg:border-white/20",children:w.jsx("dl",{className:"space-y-5",children:[{label:"DOCUMENT",value:"Terms of Use"},{label:"STATUS",value:"Current"},{label:"LAST UPDATED",value:"11 August 2026"}].map(g=>w.jsxs("div",{children:[w.jsx("dt",{className:"text-[10.5px] font-semibold uppercase tracking-[0.2em] text-white/55",children:g.label}),w.jsx("dd",{className:"mt-1.5 text-[15px] font-medium text-white",children:g.value})]},g.label))})})]})})]}),w.jsx("div",{className:"alrazah-no-print bg-[#F4F2EF] border-b border-[#E5E1DE]",children:w.jsx("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16",children:w.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 divide-x divide-[#D9D5D2]",children:[{label:"DOCUMENT TYPE",value:"Corporate Legal Document"},{label:"APPLICABILITY",value:"Alrazah Website"},{label:"CURRENT VERSION",value:"Version 2.1 · 11 Aug 2026"},{label:"LANGUAGE",value:"English | العربية"}].map(g=>w.jsxs("div",{className:"px-5 lg:px-7 py-6 lg:py-8 first:pl-0",children:[w.jsx("p",{className:"text-[10.5px] font-semibold uppercase tracking-[0.18em] text-[#777777]",children:g.label}),w.jsx("p",{className:"mt-2 text-[14px] font-medium text-[#171717]",children:g.value})]},g.label))})})}),w.jsx("div",{className:"bg-[#FAF9F7]",children:w.jsx("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-12 lg:py-16",children:w.jsxs("div",{className:"lg:grid lg:grid-cols-12 lg:gap-10",children:[w.jsx("aside",{className:"alrazah-no-print hidden lg:block lg:col-span-4 xl:col-span-3",children:w.jsxs("div",{className:"sticky top-[120px]",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8D0034]",children:"On This Page"}),w.jsx("nav",{className:"mt-5","aria-label":"Document sections",children:w.jsx("ul",{className:"space-y-1",children:Aa.map(g=>{const v=r===g.id;return w.jsx("li",{children:w.jsxs("a",{href:`#${g.id}`,onClick:S=>h(S,g.id),className:`alrazah-focus group relative flex items-baseline gap-3 py-2 pl-4 text-[13px] leading-snug transition-colors duration-200 ${v?"text-[#171717]":"text-[#565656] hover:text-[#8D0034]"}`,children:[w.jsx("span",{className:`absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-200 ${v?"bg-[#8D0034]":"bg-transparent"}`}),w.jsx("span",{className:"text-[#8D0034] font-semibold tabular-nums shrink-0",children:g.number}),w.jsx("span",{className:"font-medium",children:g.title})]})},g.id)})})})]})}),w.jsxs("div",{className:"alrazah-no-print lg:hidden mb-8",children:[w.jsxs("button",{onClick:()=>u(g=>!g),className:"alrazah-focus w-full flex items-center justify-between border border-[#D9D5D2] bg-white px-5 py-4 rounded-[2px]","aria-expanded":a,children:[w.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8D0034]",children:"On This Page"}),w.jsxs("span",{className:"flex items-center gap-2 text-[13px] font-medium text-[#565656]",children:["Sections",w.jsx(Og,{className:`h-4 w-4 transition-transform ${a?"rotate-180":""}`,strokeWidth:1.5})]})]}),a&&w.jsx("nav",{className:"mt-3 border border-[#D9D5D2] bg-white rounded-[2px] p-2","aria-label":"Document sections",children:w.jsx("ul",{children:Aa.map(g=>w.jsx("li",{children:w.jsxs("a",{href:`#${g.id}`,onClick:v=>h(v,g.id),className:`alrazah-focus flex items-baseline gap-3 px-3 py-2.5 text-[13.5px] ${r===g.id?"text-[#8D0034] font-medium bg-[#F5E8ED]":"text-[#565656]"}`,children:[w.jsx("span",{className:"text-[#8D0034] font-semibold tabular-nums",children:g.number}),g.title]})},g.id))})})]}),w.jsx("div",{ref:d,className:"lg:col-span-8 xl:col-span-8 xl:col-start-5",children:w.jsxs("div",{className:"alrazah-reading-area max-w-[720px]",children:[w.jsxs("div",{className:"alrazah-no-print flex flex-wrap items-center justify-between gap-4 pb-8 mb-10 border-b border-[#E5E1DE]",children:[w.jsxs("div",{children:[w.jsx("h2",{className:"text-[20px] font-semibold text-[#171717]",children:"Terms of Use"}),w.jsx("p",{className:"mt-1 text-[12.5px] text-[#777777]",children:"PDF · 245 KB · Version 2.1"})]}),w.jsxs("div",{className:"flex items-center gap-3",children:[w.jsxs("button",{onClick:p,className:"alrazah-focus inline-flex h-[44px] items-center gap-2 px-5 text-[13px] font-medium text-[#565656] hover:text-[#171717] transition-colors",children:[w.jsx(Ux,{className:"h-[18px] w-[18px]",strokeWidth:1.5}),"Print"]}),w.jsxs("a",{href:"#",className:"alrazah-focus inline-flex h-[44px] items-center gap-2 px-5 text-[13px] font-semibold text-[#8D0034] border border-[#8D0034] hover:bg-[#8D0034] hover:text-white transition-colors duration-200 rounded-[2px]",children:[w.jsx(Ax,{className:"h-[18px] w-[18px]",strokeWidth:1.5}),"Download PDF"]})]})]}),w.jsxs("div",{className:"mb-14",children:[w.jsx("h3",{className:"text-[22px] lg:text-[24px] font-semibold text-[#171717] leading-tight",children:"Terms governing use of this website"}),w.jsx("p",{className:"mt-5 text-[17px] lg:text-[18px] leading-[1.8] text-[#272727]",children:"Please read these Terms of Use carefully before accessing or using this website. By accessing the website, you acknowledge that you have read, understood and agree to be bound by the applicable terms set out below."})]}),w.jsx("div",{className:"space-y-16 lg:space-y-20",children:dv.map(g=>w.jsxs("section",{id:g.id,className:"scroll-mt-[140px]",children:[w.jsxs("div",{className:"flex items-baseline gap-4",children:[w.jsx("span",{className:"text-[12px] font-bold uppercase tracking-[0.16em] text-[#8D0034] tabular-nums",children:g.number}),w.jsx("span",{className:"h-px flex-1 bg-[#E5E1DE]"})]}),w.jsx("h2",{className:"mt-3 text-[26px] lg:text-[30px] font-semibold leading-[1.15] tracking-[-0.01em] text-[#171717]",children:g.title}),g.intro&&w.jsx("p",{className:"mt-6 text-[17px] lg:text-[18px] leading-[1.8] text-[#272727]",children:g.intro}),g.body&&w.jsx("div",{className:"mt-6 space-y-5",children:g.body.map((v,S)=>typeof v=="string"?w.jsx("p",{className:"text-[17px] lg:text-[18px] leading-[1.8] text-[#272727]",children:v},S):v.list?w.jsx("ul",{className:"space-y-3 pl-1",children:v.list.map((O,F)=>w.jsx("li",{className:"text-[17px] lg:text-[18px] leading-[1.75] text-[#272727] flex gap-3",children:O.label?w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"font-semibold text-[#171717] shrink-0",children:O.label}),w.jsx("span",{className:"text-[#565656]",children:O.text})]}):w.jsxs("span",{className:"flex gap-3",children:[w.jsx("span",{className:"text-[#8D0034] mt-2 h-1 w-1 shrink-0 rounded-full bg-[#8D0034]"}),O]})},F))},S):null)}),g.subsections&&w.jsx("div",{className:"mt-8 space-y-10",children:g.subsections.map(v=>w.jsxs("div",{children:[w.jsxs("div",{className:"flex items-baseline gap-3",children:[w.jsx("span",{className:"text-[14px] font-semibold text-[#8D0034] tabular-nums",children:v.number}),w.jsx("span",{className:"text-[18px] lg:text-[20px] font-semibold text-[#171717]",children:v.title})]}),v.body&&w.jsx("p",{className:"mt-4 text-[17px] lg:text-[18px] leading-[1.8] text-[#272727]",children:v.body}),v.list&&w.jsx("ul",{className:"mt-5 space-y-3",children:v.list.map((S,O)=>w.jsxs("li",{className:"text-[17px] lg:text-[18px] leading-[1.75] text-[#272727] flex gap-3",children:[w.jsx("span",{className:"font-semibold text-[#8D0034] shrink-0 tabular-nums",children:S.match(/^\([a-z]\)/)?S.slice(0,3):"·"}),w.jsx("span",{children:S.match(/^\([a-z]\)/)?S.slice(3).trim():S})]},O))})]},v.number))}),g.notice&&w.jsxs("div",{className:"mt-8 bg-[#F5E8ED] border-l-4 border-[#8D0034] px-7 py-6",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-[#8D0034]",children:g.notice.title}),w.jsx("p",{className:"mt-3 text-[16px] lg:text-[17px] leading-[1.7] text-[#272727] font-medium",children:g.notice.body})]})]},g.id))})]})})]})})}),w.jsxs("section",{className:"relative overflow-hidden bg-[#650025] text-white",children:[w.jsx("span",{className:"alrazah-watermark absolute -left-10 bottom-0 text-[160px] lg:text-[240px] leading-none text-white","aria-hidden":"true",children:"LEGAL"}),w.jsx("div",{className:"relative mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-16 lg:py-20",children:w.jsxs("div",{className:"max-w-[640px]",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-white/65",children:"Legal & Corporate Information"}),w.jsx("h2",{className:"mt-5 text-[30px] lg:text-[38px] font-semibold leading-[1.12] tracking-[-0.01em]",children:"Questions regarding these terms?"}),w.jsx("p",{className:"mt-6 text-[16px] lg:text-[17px] leading-[1.75] text-white/80",children:"For questions concerning these Terms of Use or other legal matters relating to the Alrazah website, please contact the appropriate corporate office using the official contact channels provided below."}),w.jsxs("div",{className:"mt-9 flex flex-wrap items-center gap-4",children:[w.jsxs(un,{to:"/contact",className:"alrazah-focus inline-flex h-[48px] items-center gap-2 px-7 text-[14px] font-semibold text-[#650025] bg-white hover:bg-[#F5E8ED] transition-colors duration-200 rounded-[2px]",children:["Contact Alrazah",w.jsx(_a,{className:"h-[18px] w-[18px]",strokeWidth:1.75})]}),w.jsxs(un,{to:"/legal/privacy-policy",className:"alrazah-focus inline-flex h-[48px] items-center gap-2 px-7 text-[14px] font-semibold text-white border border-white/40 hover:border-white transition-colors duration-200 rounded-[2px]",children:["View Privacy Policy",w.jsx(_a,{className:"h-[18px] w-[18px]",strokeWidth:1.75})]})]})]})})]}),w.jsx("section",{className:"bg-[#F4F2EF]",children:w.jsxs("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-16 lg:py-20",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8D0034]",children:"Related Legal Information"}),w.jsx("h2",{className:"mt-4 text-[28px] lg:text-[34px] font-semibold leading-tight tracking-[-0.01em] text-[#171717]",children:"Related legal information"}),w.jsx("div",{className:"mt-10 grid grid-cols-1 md:grid-cols-3 gap-5",children:NC.map(g=>w.jsxs(un,{to:g.href,className:"alrazah-focus group flex flex-col justify-between border border-[#D9D5D2] bg-white p-7 lg:p-8 hover:border-[#8D0034] transition-colors duration-200 rounded-[2px]",children:[w.jsxs("div",{children:[w.jsx("h3",{className:"text-[19px] font-semibold text-[#171717]",children:g.title}),w.jsx("p",{className:"mt-3 text-[14.5px] leading-[1.65] text-[#565656]",children:g.desc})]}),w.jsxs("span",{className:"mt-6 inline-flex items-center gap-2 text-[13.5px] font-semibold text-[#8D0034] group-hover:gap-3 transition-all duration-200",children:["View document",w.jsx(_a,{className:"h-[16px] w-[16px]",strokeWidth:1.75})]})]},g.title))})]})}),w.jsx("section",{className:"bg-[#F4F2EF] border-t border-[#E5E1DE]",children:w.jsx("div",{className:"mx-auto max-w-[1440px] px-6 lg:px-10 xl:px-16 py-16 lg:py-20",children:w.jsxs("div",{className:"text-center max-w-[640px] mx-auto",children:[w.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-[#8D0034]",children:"Alrazah"}),w.jsx("h2",{className:"mt-5 text-[28px] lg:text-[36px] font-semibold leading-[1.15] tracking-[-0.01em] text-[#171717]",children:"Building with discipline. Operating with purpose."}),w.jsx("p",{className:"mt-6 text-[16px] lg:text-[17px] leading-[1.75] text-[#565656]",children:"Explore the businesses, governance framework and corporate principles that shape Alrazah."}),w.jsxs(un,{to:"/",className:"alrazah-focus mt-9 inline-flex h-[48px] items-center gap-2 px-8 text-[14px] font-semibold text-white bg-[#8D0034] hover:bg-[#650025] transition-colors duration-200 rounded-[2px]",children:["Explore Alrazah",w.jsx(_a,{className:"h-[18px] w-[18px]",strokeWidth:1.75})]})]})})}),w.jsx(PC,{})]})}const AC=()=>{const{isLoadingAuth:r,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=xC();if(t||r)return w.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:w.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return w.jsx(bC,{});if(s.type==="auth_required")return o(),null}return w.jsxs(hE,{children:[w.jsx(Oc,{path:"/legal/terms-of-use",element:w.jsx(OC,{})}),w.jsx(Oc,{path:"*",element:w.jsx(vC,{})})]})};function LC(){return w.jsx(wC,{children:w.jsxs(ib,{client:wb,children:[w.jsxs(xE,{children:[w.jsx(SC,{}),w.jsx(AC,{})]}),w.jsx(j1,{})]})})}w0.createRoot(document.getElementById("root")).render(w.jsx(LC,{}));